Wednesday, January 8, 2020

WebDriver Wait - IMPLICIT & EXPLICIT

IMPLICIT - suggested though not directly expressed - Not the best practise.

driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

An implicit wait is to tell WebDriver to poll the DOM for a certain amount of time when trying to find an element or elements if they are not immediately available. The default setting is 0. Once set, the implicit wait is set for the life of the WebDriver object instance.


EXPLICIT - stated clearly and in detail - The best practise.

in some cases, if any element is taking too much time to be visible on the software web page then you can use EXPLICIT WAIT condition in your test case.

No comments:

Post a Comment