Creating an instance of EventListener

The EventListener class handles all of the events that are dispatched by the EventFiringWebDriver class. There are two ways to create an EventListener class:

  • By implementing the WebDriverEventListener interface.
  • By extending the AbstractWebDriverEventListener class provided in the WebDriver library.

It is up to you, as a test-script developer, to choose which way to go.

Get Selenium WebDriver 3 Practical Guide - Second Edition 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.