You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browser: Firefox, perhaps others
Version: Firefox 3.0.11
Operating System: Vista
What steps will reproduce the problem?
1. HTML Page has a text input with an onchange event
2. Changing the input's value either with clear() or sendKeys(...) fires
the onchange javascript event.
What is the expected output? What do you see instead?
The browser user behaviour I am trying to reproduce is changing the
text in a text input. So normally, I can call WebElement.clear() and
then WebElement.sendKeys("...").
The problem comes when the text input has an onchange js event,
because both "clear" and the "sendKeys" trigger the onchange event.
This means, I can't avoid it being called twice.
When I use firefox manually, the onchange event is fired just once,
when I click out of the text field.
What makes the problem even worse, is that sometimes, the application
I'm testing submits the form in the onchange event. I know it's a
horrible design - but that's what I've got.
What version of the product are you using? On what operating system?
1039 also happens in earlier versions
Please provide any additional information below.
This has been discussed in mailing list item "how to change the value of a
text field when it has an onchange event." and issue 156
Using Keys enum in sendkeys is a good workaround
Originally reported on Google Code with ID 214
Reported by
jjimjamon 2009-06-26 13:12:35