Last active
March 3, 2016 07:19
-
-
Save tomphp/7680261 to your computer and use it in GitHub Desktop.
Waiting for a certain page to load in using Mink & Behat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
private function waitForPageToLoad($pageName, $timeout = 10) | |
{ | |
$count = 10; | |
while (0 !== stripos($this->getSession()->getCurrentUrl(), $pageName)) { | |
sleep(1); | |
if (0 === $count--) { | |
throw new \Exception('Didn\'t return to site'); | |
} | |
} | |
} |
And what do u mean pagename ?? its <<title>> facebook signup <</title>> ??
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this function dont shows at example.feature file?? why?? i wont use this function in test (using behat)