diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php index 1917e8bab..a1815aa70 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php @@ -599,4 +599,17 @@ public function saveScreenshot() $this->_saveScreenshot($this->pngReport = $outputDir . mb_strcut($filename, 0, 245, 'utf-8') . '.fail.png'); $this->_savePageSource($this->htmlReport = $outputDir . mb_strcut($filename, 0, 244, 'utf-8') . '.fail.html'); } + + /** + * Go to a page and wait for ajax requests to finish + * + * @param string $page + * @throws \Exception + * @return void + */ + public function amOnPage($page) + { + parent::amOnPage($page); + $this->waitForPageLoad(); + } }