The EventFiringWebDriver
class is a wrapper around your normal WebDriver that gives the driver the capability to fire events. The EventListener
class, on the other hand, waits to listen from EventFiringWebDriver
and handles all of the events that are dispatched. There can be more than one listener waiting to hear from the EventFiringWebDriver
class for an event to fire. All of the event listeners should be registered with the EventFiringWebDriver
class to get notified.
The following flow diagram explains what has to be done to capture all of the events raised by EventFiringWebDriver
during the execution of test cases: