October 2018
Intermediate to advanced
192 pages
5h 12m
English
To understand explicit waits, we have to explore the WebDriverWait class. This class extends the FluentWait class. The FluentWait class implements the wait interface.
The WebDriverWait constructor has three overloaded versions. We will be using the version with two arguments, which is the most common version. The signature of the WebDriverWait constructor with two arguments is public WebDriverWait(WebDriver,long). The way to instantiate a WebDriverWait object is by phrasing the code as follows:
WebDriverWait wdWait = new WebDriverWait(driver,15);
Here, we specify the maximum waiting time as 15 seconds. To understand the explicit wait, we should first familiarize ourselves with a class called ExpectedConditions. This class has ...
Read now
Unlock full access