From c59e52f561ff33dc98a497796e0ea1e84624d9af Mon Sep 17 00:00:00 2001 From: David Monllao Date: Thu, 25 Apr 2013 17:07:57 +0800 Subject: [PATCH] MDL-39348 behat: Switching to wait which does not conflict with IE Also solving bug with DOM ready, timeout was set to self::TIMEOUT miliseconds not seconds. --- lib/tests/behat/behat_hooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tests/behat/behat_hooks.php b/lib/tests/behat/behat_hooks.php index a8893482ae7..2f2bb5d03dc 100644 --- a/lib/tests/behat/behat_hooks.php +++ b/lib/tests/behat/behat_hooks.php @@ -147,7 +147,7 @@ class behat_hooks extends behat_base { // Just trying if server responds. try { - $this->getSession()->executeScript('// empty comment'); + $this->getSession()->wait(0, false); } catch (Exception $e) { $moreinfo = 'More info in ' . behat_command::DOCS_URL . '#Running_tests'; $msg = 'Selenium server is not running, you need to start it to run tests that involves Javascript. ' . $moreinfo; @@ -172,7 +172,7 @@ class behat_hooks extends behat_base { // Wait until the page is ready. try { - $this->getSession()->wait(self::TIMEOUT, '(document.readyState === "complete")'); + $this->getSession()->wait(self::TIMEOUT * 1000, '(document.readyState === "complete")'); } catch (NoSuchWindow $e) { // If we were interacting with a popup window it will not exists after closing it. } -- 2.11.4.GIT