当前位置: 首页>>代码示例>>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;未经允许,请勿转载。