The Selenium2 driver was typing Backspace (for Windows) + Delete (for Mac) keys to the input/textarea in the amount needed to erase the current value. That allowed any JavaScript code of that page, that monitored input/textarea value change (e.g., to prevent certain keys from being typed) to behave as if a real human was doing this.
This driver uses the clear method of the WebDriver to clear the input/textarea value.
Does it fire necessary JS keyboard events in the process as well in every Selenium+Browser combination being tested?
P.S.
- We're likely not having tests to verify that behavior.
- The
clear WebDriver method might be changing element focus, which might fire a duplicate focus/blur event when using clear+sendKeys together.