Hi,
I am testing an AJAX heavy web app which uses 'onchange' events on text
fields. Approx one tenth of the time, when I fire an onchange event using
fire_event, it causes Watir to timeout for 5 minutes.
For example:
When I set "Letter" to "Blah" #
features/step_definitions/input_text_steps.rb:7
execution expired (Timeout::Error)
C:/Sandbox/Tools/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/timeout.rb:64:in
`wait'
./features/support/../../lib/blah/form.rb:38:in `[]='
./features/step_definitions/input_text_steps.rb:8:in `/^I set "([^"]*)"
to "([^"]*)"$/'
features\sociability\blah\blah.feature:45:in `When I set "Letter" to
"blah"'
I traced this down the the element.rb file, and have monkey patched this
class to remove the @container.wait, but I was wondering if there is a
better way? As it only happens about 10% of the time, it makes it hard to
debug, but removing the wait from fire_event seems to have resolved the
issue. I thought about catching the Timeout::Error, but I don't want my
script to freeze for 5 minutes at a time.
Any help would be appreciated.
def fire_event(event)
assert_exists
assert_enabled
highlight(:set)
ole_object.fireEvent(event)
#[email protected]
highlight(:clear)
end
Cheers,
Alister
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development