TestProject Forum
Powered by leading experts in the test automation community

Selenium wait for transition page to redirect before running assertion

I have a procedure that loads a transition page, and then that page redirects to another page, which takes time to load.

I want to run assertions on the second page (not the transition one). How do I tell Selenium WebDriver to wait until the second page loads before performing the assertions?

An easy way to do this would be to waitForElement or waitForText that is supposed to appear on your 2nd page
this way you can be certain you’re on the right page before running any assertions

That could work

Haven’t thought of that