Skip to content

Commit 4e1affe

Browse files
authored
Merge pull request #79 from rocketweb/waitforpageload-after-amonpage
- Added the 'waitForPageLoad' action after every 'amOnPage' action
2 parents fb1e4b7 + b3cff79 commit 4e1affe

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,4 +599,17 @@ public function saveScreenshot()
599599
$this->_saveScreenshot($this->pngReport = $outputDir . mb_strcut($filename, 0, 245, 'utf-8') . '.fail.png');
600600
$this->_savePageSource($this->htmlReport = $outputDir . mb_strcut($filename, 0, 244, 'utf-8') . '.fail.html');
601601
}
602+
603+
/**
604+
* Go to a page and wait for ajax requests to finish
605+
*
606+
* @param string $page
607+
* @throws \Exception
608+
* @return void
609+
*/
610+
public function amOnPage($page)
611+
{
612+
parent::amOnPage($page);
613+
$this->waitForPageLoad();
614+
}
602615
}

0 commit comments

Comments
 (0)