Codeception\Module\WPBrowserMethods::loginAs PHP Метод

loginAs() публичный Метод

Goes to the login page and logs in using the given credentials.
public loginAs ( string $username, string $password ) : array
$username string
$password string
Результат array An array of login credentials and auth cookies.
    public function loginAs($username, $password)
    {
        $this->amOnPage($this->loginUrl);
        $this->fillField('#user_login', $username);
        $this->fillField('#user_pass', $password);
        $this->click('#wp-submit');
        return ['username' => $username, 'password' => $password, 'authCookie' => $this->grabWordPressAuthCookie(), 'loginCookie' => $this->grabWordPressLoginCookie()];
    }