Creating a WebDriver instance

Now that we have created our listener class that listens for all of the events generated, it's time to create our test script class and let it call IAmTheDriver.java. After the class is created, we declare a ChromeDriver instance in it:

WebDriver driver = new ChromeDriver();

The ChromeDriver instance will be the underlying driver instance that drives all the driver events. This is nothing new. The step explained in the next section is where we make this driver an instance of EventFiringWebDriver.

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.