Tuesday, 20 June 2017

Implicit wait vs Explicit wait in Selenium Webdriver

Implicit wait is used to wait for fixed duration for all elements to be available.
But ideally not all elements need fixed amount of time. Some elements may need 2 sec while some elements may need 50 seconds.


So I never recommend my team members to use the implicit wait. We should always use explicit wait conditions which helps us specify different timeouts for each element seperately.

You should never use implicit wait and explicit wait together. If you use them together, you will end up encountering unexpected timeouts in your application.
For example - if you have set the implicit wait to 20 seconds and for a specific element you have used the explicit wait, then explicit wait will only work if element is available in page. Explicit wait will not work as expected when element is not available on page.

What do you think on above selenium topic. Please provide your inputs and comments. You can write to me at reply2sagar@gmail.com

Buy Best Selenium Books

Contributors