From f267432c64059df0335fdfbda247c734132aa842 Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Thu, 13 Sep 2018 14:08:28 -0500 Subject: [PATCH] MQE-1142: Use timeout value when waitForLoadingMaskToDisappear - bug fix --- .../FunctionalTestingFramework/Module/MagentoWebDriver.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php index cab4bb7e3..b343e4867 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php @@ -367,16 +367,17 @@ public function waitForPageLoad($timeout = null) $this->waitForJS('return document.readyState == "complete"', $timeout); $this->waitForAjaxLoad($timeout); - $this->waitForLoadingMaskToDisappear(); + $this->waitForLoadingMaskToDisappear($timeout); } /** * Wait for all visible loading masks to disappear. Gets all elements by mask selector, then loops over them. * + * @param integer $timeout * @throws \Exception * @return void */ - public function waitForLoadingMaskToDisappear() + public function waitForLoadingMaskToDisappear($timeout) { foreach (self::$loadingMasksLocators as $maskLocator) { // Get count of elements found for looping. @@ -385,7 +386,7 @@ public function waitForLoadingMaskToDisappear() for ($i = 1; $i <= count($loadingMaskElements); $i++) { // Formatting and looping on i as we can't interact elements returned above // eg. (//div[@data-role="spinner"])[1] - $this->waitForElementNotVisible("({$maskLocator})[{$i}]", 30); + $this->waitForElementNotVisible("({$maskLocator})[{$i}]", $timeout); } } }