You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
749 B
40 lines
749 B
<?php |
|
|
|
namespace tests\_pages; |
|
|
|
class LoginPage extends \yii\codeception\BasePage |
|
{ |
|
|
|
public static $URL = '?r=site/login'; |
|
|
|
/** |
|
* login form username text field locator |
|
* @var string |
|
*/ |
|
public $username = 'input[name="LoginForm[username]"]'; |
|
|
|
/** |
|
* login form password text field locator |
|
* @var string |
|
*/ |
|
public $password = 'input[name="LoginForm[password]"]'; |
|
|
|
/** |
|
* login form submit button locator |
|
* @var string |
|
*/ |
|
public $button = 'button[type=submit]'; |
|
|
|
/** |
|
* |
|
* @param string $username |
|
* @param string $password |
|
*/ |
|
public function login($username, $password) |
|
{ |
|
$this->guy->fillField($this->username,$username); |
|
$this->guy->fillField($this->password,$password); |
|
$this->guy->click($this->button); |
|
} |
|
|
|
}
|
|
|