yii2-netdisk/tests/codeception/_pages/LoginPage.php

26 lines
575 B
PHP

<?php
namespace codeception\_pages;
use yii\codeception\BasePage;
/**
* Represents login page
* @property \AcceptanceTester|\FunctionalTester $actor
*/
class LoginPage extends BasePage
{
public $route = 'site/login';
/**
* @param string $username
* @param string $password
*/
public function login($username, $password)
{
$this->actor->fillField('input[name="LoginForm[username]"]', $username);
$this->actor->fillField('input[name="LoginForm[password]"]', $password);
$this->actor->click('login-button');
}
}