Implict Vs Explicit Wait in Selenium

Wait is an important term while writing automated Test Scripts using Selenium as some Web Elements might not be clickable while performing actions on them or they might take some time to load. 

We might get runtime errors like:
org.openqa.selenium.WebDriverException: Element is not clickable at point. Other element would receive the click.

We widely use two kinds of Wait in Selenium:  Implicit Wait and Explicit Wait.

Implicit Wait 
Implicit wait waits for a certain defined period of time. Example in below code snippet.

Explicit Wait 
Explicit Wait is far better than Implicit Wait as it waits for any Web Element which does not load due to Ajax or JavaScript calls on webpage. 

Sample Common Functions to be used for Implicit & Explicit Wait:

Implict Vs Explicit Wait in Selenium Implict Vs Explicit Wait in Selenium Reviewed by Ishan Dev Shukl on December 03, 2019 Rating: 5

No comments:

Thanks a lot for your valuable Comment!

Powered by Blogger.