When calling the set
method of a text_field in ruby, the text is being entered at a very slow rate in the browser, roughly at 1 character / second.
Environment Information:
- Ubuntu 10.10
- FireFox 3.6.13
- JSSh 0.9
- Ruby 1.9.2p136
- FireWatir 1.7.1
Kindly advice. Thanks in advance.
It is a known bug: WTR-397
Workaround is to use watir-webdriver or to use
value=
instead ofset
. Example:solve slow key type issue on firewatir:
need to edit the file
text_field.rb
enter to the folder#>cd /usr/lib/ruby/gems/1.8/gems/firewatir-1.7.1/lib/firewatir/elements/
make it writeable#>chmod 777 text_field.rb
edit the procdef doKeyPress( value )
@o.fireEvent("onKeyDown")
and@o.fireEvent("onKeyPress")
and@o.fireEvent("onKeyPress")
instead enter
fire_key_events
now it should work faster