I use selenium IDE to initially record the tests and save them as Java WebDriver tests.

When I go into an input field, delete all the text and enter a new value, it records that as 2 commands:

```
driver.findElement(By.id("username")).clear();
driver.findElement(By.id("username")).sendKeys("johnnyleitrim");

```

One problem with this for me is that the clear() event fires a Javascript change event for the "username" field. This does not happen when I use the browser itself - it waits until the field loses focus before firing the change javascript event, and that's what I want to emulate in Selenium.

The reason I need this is that I do validation on the change() event, and when change is called with an empty value, it displays an alert telling the user the information is invalid - and this alert stops Selenium

So how do I clear the field without using `WebElement.clear()`?