Selenium - Syncronization

 

Synchronization

1.Implicit wait- Global wait and is applied to each Test Step of Test case – Maximum time limit to wait – implicit wait does not catch any performance errors and makes the test execution slow – implicit wait waits up to max timeout specified before throwing any exception.

Driver.manage().timeouts().implicitlyWait(10, Timeunit.MILLISECONDS)

 

2.Explicit wait –Applied to specific Element of a page – Explicit wait is specific to test scenario – doesn’t affect the test execution speed

WebDriverWait –> uses built in wait methods

Monitors the DOM until Timeout or till the object is found within the specified time

 webDriverWait w=new webDriverWait(driver, 10)

Fluent Wait -> need to build customized wait methods based on the condition to be met

Monitors DOM by polling at regular intervals defined by polling duration time

3.Thread.sleep

Comments

Popular posts from this blog

QA's approach 2 Java - Understanding Static context

Selenium 4 absolute beginners - How to create Batch execution file

Technologies - Log4J - Create Log4j Configuration File - Where ? How ? What ?