From the course: Advanced Selenium: 3 Synchronization Strategies

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

ExpectedConditions

ExpectedConditions - Selenium Tutorial

From the course: Advanced Selenium: 3 Synchronization Strategies

Start my 1-month free trial

ExpectedConditions

- [Instructor] WebDriver has the built in expected conditions class which has sample conditions for us to use in WebDriverwait. For many applications this will offer enough flexibility to synchronize on all the application states. So in my example expected conditions test we're going to use that for this lecture. So if I scroll down here we can see a test that you've pretty much seen before. The expected conditions clickable link visits the collapsible div page finds the div, clicks on it sets up the locator for the about link, and then has a wait condition in there. And finally, we click on the link and assert that the url is correct. Let me just tidy this up a bit to try and fit it on the screen. So we're going to experiment with the expected conditions. To learn what expected conditions we have, the easiest thing to do is to use code completion. If I go after ExpectedConditions. here and press CTRL + SPACE…

Contents