當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Session::wait方法代碼示例

本文整理匯總了PHP中Behat\Mink\Session::wait方法的典型用法代碼示例。如果您正苦於以下問題:PHP Session::wait方法的具體用法?PHP Session::wait怎麽用?PHP Session::wait使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Behat\Mink\Session的用法示例。


在下文中一共展示了Session::wait方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getAllErrorsOnPage

 /**
  * @param string $path
  * @param null   $wait
  * @param string $submitId
  *
  * @return array
  */
 protected function getAllErrorsOnPage($path, $wait = null, $submitId = 'form_submit')
 {
     $this->visitTest($path);
     $this->session->getPage()->findButton($submitId)->click();
     if ($wait) {
         $this->session->wait(5000, $wait);
     }
     return $this->fetchErrors();
 }
開發者ID:eko,項目名稱:JsFormValidatorBundle,代碼行數:16,代碼來源:BaseMinkTestCase.php

示例2: getAllErrorsOnPage

 /**
  * @param string $path
  * @param null   $wait
  * @param string $submitId
  *
  * @return array
  */
 protected function getAllErrorsOnPage($path, $wait = null, $submitId = 'form_submit')
 {
     $this->visitTest($path);
     $button = $this->session->getPage()->findButton($submitId);
     $this->assertNotNull($button, "Button ID '{$submitId}' does not found'");
     $button->click();
     if ($wait) {
         $this->session->wait(5000, $wait);
     }
     return $this->fetchErrors();
 }
開發者ID:usetreno,項目名稱:JsFormValidatorBundle,代碼行數:18,代碼來源:BaseMinkTestCase.php

示例3: _shoot_shot

 /**
  *
  * @param \Pachico\Voyeur\Shot $shot
  * @return string
  */
 protected function _shoot_shot(Shot $shot)
 {
     // Starting sesion if not started yet (in short, open browser)
     if (!$this->_session->isStarted()) {
         $this->_log_out('Starting camera session');
         $this->_session->start();
     }
     $this->_log_out('Loading ' . $shot->get_uri());
     $this->_log_out("Resizing window to " . $shot->get_width() . 'x' . $shot->get_height());
     $this->_session->resizeWindow($shot->get_width(), $shot->get_height());
     // Load page
     $this->_session->visit($shot->get_uri());
     $this->_log_out("Loading finished");
     // Should I wait for something?
     if (count($shot->get_wait_for()) > 0) {
         foreach ($shot->get_wait_for() as $waitings) {
             $wait_time = key($waitings);
             $condition = is_null(current($waitings)) ? null : current($waitings);
             $this->_log_out("Waiting " . $wait_time . ' microseconds');
             $condition and $this->_log_out("Or until " . $condition);
             $this->_session->wait($wait_time, $condition);
         }
     }
     // Any scripts to execute?
     if (count($shot->get_scripts()) > 0) {
         foreach ($shot->get_scripts() as $script) {
             $script = $this->_get_script_file_content($script);
             $this->_session->executeScript($script);
         }
     }
     // Finally take the screenshot and return it
     $this->_log_out("Taking screenshot");
     $picture = $this->_session->getScreenshot();
     return $picture;
 }
開發者ID:pachico,項目名稱:voyeur,代碼行數:40,代碼來源:Voyeur.php

示例4: testWait

 public function testWait()
 {
     $this->driver->expects($this->once())->method('wait')->with(1000, 'function () {}');
     $this->session->wait(1000, 'function () {}');
 }
開發者ID:saberyounis,項目名稱:Sonata-Project,代碼行數:5,代碼來源:SessionTest.php

示例5: openController

 /** @noinspection MoreThanThreeArgumentsInspection
  * @param Controller $module
  * @param Session $session
  * @param int $wait
  * @param bool $makeSS
  */
 private function openController(Controller $module, Session $session, $wait = 100, $makeSS = false)
 {
     $page = $session->getPage();
     $nav = $page->findById('nav');
     $container = $nav->findById('mi_' . $module->getId());
     $link = $container->find('css', 'a:first-child');
     $link->click();
     $session->wait($wait);
     if ($makeSS) {
         Mink::getInstance()->ss();
     }
 }
開發者ID:dafik,項目名稱:cc-tests-reverse,代碼行數:18,代碼來源:Phantom.php


注:本文中的Behat\Mink\Session::wait方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。