コード例 #1
0
ファイル: Helper.php プロジェクト: roccivic/phpmyadmin
 /**
  * perform a login
  *
  * @param string $username Username
  * @param string $password Password
  *
  * @return void
  */
 public function login($username, $password)
 {
     $this->_selenium->url($this->_config->getLoginURL());
     $usernameField = $this->_selenium->byId($this->_txtUsername);
     $usernameField->value($username);
     $passwordField = $this->_selenium->byId($this->_txtPassword);
     $passwordField->value($password);
     $this->_selenium->byId($this->_btnLogin)->click();
 }
コード例 #2
0
 public function refresh()
 {
     if (!is_null($this->redirectUrl)) {
         $this->test->url($this->redirectUrl);
         $this->waitPageToLoad();
         $this->waitForAjax();
     }
     return $this;
 }
コード例 #3
0
 /**
  * Assert the URL
  *
  * @param null|string $url An optional URL to assert.
  * @return void
  * @todo Cover base with beginning and relative URL with trailing slash.
  * @todo What if there is no absolute URl and no base URl set?
  */
 protected function _assertUrl($url = null)
 {
     if ($url) {
         $this->url = $url;
     }
     // Treat set url as absolute URL, if it begins with "http:" or "https:"
     if (strpos($this->url, 'http:') === 0 || strpos($this->url, 'https:') === 0) {
         $fullUrl = $this->url;
     } else {
         // Remove trailing slash(es) from base URL
         $baseUrl = $this->test->getBrowserUrl();
         $baseUrl = rtrim($baseUrl, '/');
         // Remove leading slash(es) from relative URL
         $relUrl = ltrim($this->url, '/');
         // Build full URL with one slash in between
         $fullUrl = sprintf('%s/%s', $baseUrl, $relUrl);
     }
     $this->test->assertEquals($fullUrl, $this->test->url());
 }
コード例 #4
0
ファイル: AbstractPage.php プロジェクト: kstupak/platform
 /**
  * @return \Oro\Bundle\UserBundle\Tests\Selenium\Pages\Login
  */
 public function logout()
 {
     $this->test->url('/user/logout');
     return new Login($this->test);
 }