Synchronization utility classes
One of the most important classes in the Selenium framework is the library containing all the test "synchronization" methods. In test automation, it is always necessary to "wait" for something to happen on a page after sending an event. That would include such actions as waiting for the page to render, waiting for an Ajax control to complete, waiting for a different page to appear, waiting for an item in a table, and so on. If test scripts are not synchronized, they will randomly fail when applications run faster or slower during execution, throwing exceptions that specific elements are not found. Selenium has introduced a set of classes that accommodate all of the types of synchronization that are required in browser and mobile testing.
Selenium synchronization classes
Some of the highlights of the synchronization classes that will be covered include:
- The
ExpectedConditions
class - The
WebDriverWait
/FluentWait
classes - Custom synchronization class: wrapping
ExpectedConditions...