How do you achieve synchronization in WebDriver


We can use implicit wait.

Syntax- driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);

Here it will wait for 10sec if while execution driver did not find the element in the page immediately. This code will attach with each and every line of the script automatically. It is not required to write every time. Just write it once after opening the browser.


No comments :

No comments :

Post a Comment