O'Reilly logo

Selenium WebDriver Practical Guide by Satya Avasarala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exploring different WebDriver event listeners

We have seen some of the methods in our EventListeners that get invoked when their corresponding events are executed, for example, before and after navigation methods are invoked when the navigateTo event is triggered. Here we'll see all of the methods that WebDriverEventListener provides us.

Listening for WebElement value change

This event occurs when the value of a WebElement changes when the sendKeys() or clear() methods are executed on them. There are two methods associated with this event.

public void beforeChangeValueOf(WebElement element, WebDriver driver)

The preceding method is invoked before the WebDriver attempts to change the value of the WebElement. As a parameter, the WebElement itself is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required