コード例 #1
0
ファイル: Browser.php プロジェクト: flrnull/acceptie
 /**
  * @param string $name
  * @return string
  */
 public function getCookie($name)
 {
     $result = null;
     $cookieData = $this->_driver->manage()->getCookieNamed($name);
     if ($cookieData !== null) {
         $result = urldecode($cookieData['value']);
     }
     return $result;
 }
コード例 #2
0
 public function testSessionSnapshots()
 {
     $this->module->amOnPage('/');
     $this->module->setCookie('PHPSESSID', '123456', ['path' => '/']);
     $this->module->saveSessionSnapshot('login');
     $this->module->seeCookie('PHPSESSID');
     $this->webDriver->manage()->deleteAllCookies();
     $this->module->dontSeeCookie('PHPSESSID');
     $this->module->loadSessionSnapshot('login');
     $this->module->seeCookie('PHPSESSID');
 }
コード例 #3
0
ファイル: WebDriver.php プロジェクト: Eli-TW/Codeception
 /**
  * Maximizes current window
  */
 public function maximizeWindow()
 {
     $this->webDriver->manage()->window()->maximize();
 }
コード例 #4
0
ファイル: AjaxUnitTest.php プロジェクト: jibladakpo/helpdesk
 /**
  * Specify the amount of time the driver should wait when searching for an element if it is not immediately present.
  * @param number $seconds specify the wait time in seconds
  */
 public function waitFor($seconds = 5)
 {
     self::$webDriver->manage()->timeouts()->implicitlyWait($seconds);
 }
コード例 #5
0
ファイル: WebDriver.php プロジェクト: RobertWang/Codeception
 public function loadSessionSnapshot($name)
 {
     if (!isset($this->sessionSnapshots[$name])) {
         return false;
     }
     foreach ($this->sessionSnapshots[$name] as $cookie) {
         $this->webDriver->manage()->addCookie($cookie);
     }
     $this->debugSection('Snapshot', "{$name} session restored");
     return true;
 }