Answer the question
In order to leave comments, you need to log in
How to wait for a link to be followed after a click() without an explicit wait()?
Hello. I'm using codeception for acceptance tests and would like to know how to wait for the page to load after following a link with click() without using an explicit wait() with a number of seconds. In webdriver options I have set smartWait.
see() waits for the text, the button, but what about the title? seeInTitle() does not wait for the page to load after a redirect and immediately throws an error (compares the old title). I would like something like wait.untill(seeInTitle()), but I could not find anything like it.
Answer the question
In order to leave comments, you need to log in
Have you seen that it doesn't work with all locators?
It is important to understand that SmartWait works only with a specific locators:
#locator - CSS ID locator, works
//locator - general XPath locator, works
['css' => 'button''] - strict locator, works
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question