- Learn Selenium
- Unmesh Gundecha Carl Cocchiaro
- 106字
- 2021-06-24 13:25:47
Introducing the eventFiringWebDriver and eventListener classes
The EventFiringWebDriver class is a wrapper around the WebDriver that gives the driver the capability to fire events. The EventListener class, on the other hand, waits to listen to 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: