Comment #4 on issue 214 by jari.bakken: onchange js event fired in
WebElement.clear() and WebElement.sendKeys()
http://code.google.com/p/selenium/issues/detail?id=214
This report is quite old. Is this still a problem in 2.0b1?
Yes, still behaving the same. I still have to use the workaround described
in comment 2. The bug title and report aren't very accurate though.
I'm trying to get consistent behaviour between HTMLUnit and Firefox drivers
WebElement.sendKeys(text) doesn't fire onchange(). I'm happy with that.
WebElement.clear() fires onchange() if the input had a value. Is that
right? It means I can't use it.
org.openqa.selenium.Keys don't work in HTMLUnit (e.g. BACK_SPACE and
TAB). That means I have use the above workaround to change the value of a
input.
Hi jjim...@googlemail.com,
I ma new to Selenium. I have used Selenium IDE,
and facing many problem, error. Searched in web but could not get clear
notes or idea about the error or Selenium can u give any notes about
Selenium.
Thanks & Regards
Sakthy
(sakth...@gmail.com)
+1 on this. the Clear() method should not fire any change event until focus
is moved to another element.
.Clear should not trigger onchange event. I belive that if just sendkeys
would trigger events it would do the trick.
I have login page and when I want to login as different user and
call .Clear it triggers validation that username is not defined and
SendKeys do not trigger the validation again. I have made an workaround
that unless you want to empty textbox keeps always at least 1 character
within textbox but it is not clear solution.
I have tries this with Selenium 2.12 (.Net) and Firefox 7.01 and IE 9 same
issues with both browser
Using version 2.17.0 and still HtmlUnit driver trigger onChange for
element.clear() but not for element.sendKeys(Keys.TAB)...
I'm also hitting this issue with 2.18.0 IE8, FF9 & Chrome16 drivers - a
real pain.
With Firefox 5.0.1 and Selenium 2.16.1 is not triggering onchange event for
me with I call element.clear() on an input element. Now you know!