Adding rescue from Webrat::TimeoutError in selenium matchers which allows NegativeMatchers to behave correctly

This commit is contained in:
Noah Davis 2009-01-24 01:36:58 -05:00
parent 18fa3ab11c
commit f956bea7dd
4 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,7 @@
* Bug fixes * Bug fixes
* rescue from Webrat::TimeoutError in selenium matchers which allows NegativeMatchers to behave correctly (Noah Davis)
* Switch to using selenium.click instead of .check when checking a checkbox * Switch to using selenium.click instead of .check when checking a checkbox
(Noah Davis) (Noah Davis)
* Create tmp/pids directory if directory does not exist. (Amos King and Mike Gaffney) * Create tmp/pids directory if directory does not exist. (Amos King and Mike Gaffney)

View File

@ -16,6 +16,8 @@ module Webrat
response.session.wait_for do response.session.wait_for do
response.selenium.is_text_present(text_finder) response.selenium.is_text_present(text_finder)
end end
rescue Webrat::TimeoutError
false
end end
# ==== Returns # ==== Returns

View File

@ -10,6 +10,8 @@ module Webrat
response.session.wait_for do response.session.wait_for do
response.selenium.is_element_present("css=#{@expected}") response.selenium.is_element_present("css=#{@expected}")
end end
rescue Webrat::TimeoutError
false
end end
# ==== Returns # ==== Returns

View File

@ -10,6 +10,8 @@ module Webrat
response.session.wait_for do response.session.wait_for do
response.selenium.is_element_present("xpath=#{@expected}") response.selenium.is_element_present("xpath=#{@expected}")
end end
rescue Webrat::TimeoutError
false
end end
# ==== Returns # ==== Returns