For understanding EventFiringWebDriver, we need to understand the concept of listeners.

Listeners work silently without hampering the flow of the Selenium WebDriver script. Listeners help us find out the result of a particular action before or after the action happens. Take the scenario of clicking on a button. Listeners indicate when the WebDriver instance is about to execute the click of a button. Similarly, listeners also indicates that a button has already been clicked. 

To create such a listener, we need to use an interface called WebDriverEventListener, which has to be implemented by a concrete class, which becomes our listener. Let's see the process of creating one.

The following class implements WebDriverEventListener ...

Get Selenium WebDriver Quick Start Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.