Exemple #1
0
 public function waitForPageToLoad($period = null)
 {
     if (is_null($period)) {
         $period = $this->defaultMaxPeriodToWait;
     }
     parent::waitForPageToLoad($period);
 }
 /**
  * Temporary workaround to timeout on page loads not working as it should
  * http://stackoverflow.com/questions/9291829/selenium-test-timeout-doesnt-stop-the-test-phpunit-3-6-10-selenium-rc-2-19-0
  *
  * @throws SeleniumTimeoutException
  * @param int|null $timeout Time to wait in milliseconds
  */
 public function waitForPageToLoad($timeout = null)
 {
     if (is_null($timeout)) {
         $timeout = $this->selenium_timeout;
     }
     $start = time();
     parent::waitForPageToLoad($timeout);
     $end = time();
     if ($end - $start >= $timeout / 1000) {
         throw new SeleniumTimeoutException('Timed out after ' . $timeout . 'ms.');
     }
 }