diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php b/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php index 0c02388..815a26b 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php @@ -6,8 +6,6 @@ use Behat\Mink\Exception\ElementHtmlException; use Behat\Mink\Exception\ElementNotFoundException; use Behat\Mink\Exception\UnsupportedDriverActionException; -use Behat\Mink\Selector\Xpath\Manipulator; -use Behat\Mink\Session; use Drupal\Tests\WebAssert; /** @@ -66,7 +64,7 @@ function isAjaxing(instance) { public function waitForElement($selector, $locator, $timeout = 10000) { $page = $this->session->getPage(); - $result = $page->waitFor($timeout, function() use ($page, $selector, $locator) { + $result = $page->waitFor($timeout / 1000, function() use ($page, $selector, $locator) { return $page->find($selector, $locator); }); @@ -92,12 +90,12 @@ public function waitForElement($selector, $locator, $timeout = 10000) { public function waitForElementVisible($selector, $locator, $timeout = 10000) { $page = $this->session->getPage(); - $result = $page->waitFor($timeout, function() use ($page, $selector, $locator) { + $result = $page->waitFor($timeout / 1000, function() use ($page, $selector, $locator) { $element = $page->find($selector, $locator); if (!empty($element) && $element->isVisible()) { return $element; } - return null; + return NULL; }); return $result;