diff --git a/lib/tests/behat/behat_hooks.php b/lib/tests/behat/behat_hooks.php index c92e13847f3..f57dfec9b3f 100644 --- a/lib/tests/behat/behat_hooks.php +++ b/lib/tests/behat/behat_hooks.php @@ -52,11 +52,6 @@ use Behat\Behat\Event\StepEvent as StepEvent; */ class behat_hooks extends behat_base { - /** - * @var string The last visited URL. - */ - private $lasturl = null; - /** * Gives access to moodle codebase, ensures all is ready and sets up the test lock. * @@ -162,12 +157,8 @@ class behat_hooks extends behat_base { return; } - // Wait until the page is ready if we are in a new URL. - $currenturl = $this->getSession()->getCurrentUrl(); - if (is_null($this->lasturl) || $currenturl !== $this->lasturl) { - $this->lasturl = $currenturl; - $this->getSession()->wait(self::TIMEOUT, '(document.readyState === "complete")'); - } + // Wait until the page is ready. + $this->getSession()->wait(self::TIMEOUT, '(document.readyState === "complete")'); } }