The EventFiringWebDriver class

The EventFiringWebDriver class is a sort of API that encloses arbitrary WebDriver instances to register WebDriverEventListener; it provides an automatic system to trigger events. For example, whenever a test failure occurs, the automatic screen capture method gets activated and starts logging screenshots. The EventFiringWebDriver class is highly recommended for better reporting and test maintenance. Through EventFiringWebDriver, the user can have full control over the web page under test, including control over navigation, over finding elements, on exception, the click action, over script execution, and so on.

Follow these regulations to run tests through EventFiringWebDriver:

  1. Create a Listeners class by either implementing ...

Get Selenium Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.