Selenium Webdriver Tutorials

Selenium WebDriver Wait commands | Different types of wait in Selenium Webdriver

Today most of the web applications are developed using Ajax and Javascript, i.e. the elements within the page might load at different time intervals. What if you write a Selenium WebDriver script just to encounter “ElementNotVisibleException” or “NoSuchElementException”? Yeah! It can be frustrating. This happens when WebDriver tries to identify an element that is still not loaded (or visible). We call it as “Sync issue” in automation. How to avoid the rework? Simple, wait for ‘some’ time during execution until elements are properly loaded or are visible in the webpage. It is NOT recommended to use Thread.Sleep() while testing or building the framework. So how do you wait in Selenium Webdriver? What are the Selenium WebDriver Wait commands? Let’s understand the different types of wait in Selenium Webdriver – Implicit, Explicit and Fluent Wait!