diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php index e5b1c70d8..4db5fd259 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php @@ -403,7 +403,7 @@ public function waitForAjaxLoad($timeout = null) $timeout = $timeout ?? $this->_getConfig()['pageload_timeout']; try { - $this->waitForJS('return !!window.jQuery && window.jQuery.active == 0;', $timeout); + $this->waitForJS('return (typeof window.jQuery === "undefined") || window.jQuery.active == 0;', $timeout); } catch (\Exception $exceptione) { $this->debug("js never executed, performing {$timeout} second wait."); $this->wait($timeout);