Blame view

tests/codeception/common/_pages/LoginPage.php 707 Bytes
b0f143c3   Yarik   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  <?php
  
  namespace tests\codeception\common\_pages;
  
  use yii\codeception\BasePage;
  
  /**
   * Represents loging page
   * @property \codeception_frontend\AcceptanceTester|\codeception_frontend\FunctionalTester|\codeception_backend\AcceptanceTester|\codeception_backend\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');
      }
  }