-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Selenium Testing Tools Cookbook Second Edition
By :
The Selenium WebDriver provides an explicit wait for synchronizing tests, which provides a better way to wait over an implicit wait. Unlike an implicit wait, you can write and use pre-defined conditions or custom conditions for wait before proceeding further in the code.
The Selenium WebDriver provides the WebDriverWait and ExpectedConditions classes to implement an explicit wait.
The ExpectedConditions class provides a set of predefined conditions to wait for before proceeding further in the code. The following table shows some common conditions that we frequently come across when automating web browsers supported by the ExpectedConditions class:
|
Predefined condition |
Selenium method |
|---|---|
|
An element is visible and enabled |
|
|
An element is selected |
|
|
Presence of an element |
|
|
Specific text present in an element |
|
Change the font size
Change margin width
Change background colour