Skip to content

Commit

Permalink
Adding rescue from Webrat::TimeoutError in selenium matchers which al…
Browse files Browse the repository at this point in the history
…lows NegativeMatchers to behave correctly
  • Loading branch information
Noah Davis committed Jan 24, 2009
1 parent 18fa3ab commit f956bea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions History.txt
Expand Up @@ -8,6 +8,7 @@

* 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
(Noah Davis)
* Create tmp/pids directory if directory does not exist. (Amos King and Mike Gaffney)
Expand Down
2 changes: 2 additions & 0 deletions lib/webrat/selenium/matchers/have_content.rb
Expand Up @@ -16,6 +16,8 @@ def matches?(response)
response.session.wait_for do
response.selenium.is_text_present(text_finder)
end
rescue Webrat::TimeoutError
false
end

# ==== Returns
Expand Down
2 changes: 2 additions & 0 deletions lib/webrat/selenium/matchers/have_selector.rb
Expand Up @@ -10,6 +10,8 @@ def matches?(response)
response.session.wait_for do
response.selenium.is_element_present("css=#{@expected}")
end
rescue Webrat::TimeoutError
false
end

# ==== Returns
Expand Down
2 changes: 2 additions & 0 deletions lib/webrat/selenium/matchers/have_xpath.rb
Expand Up @@ -10,6 +10,8 @@ def matches?(response)
response.session.wait_for do
response.selenium.is_element_present("xpath=#{@expected}")
end
rescue Webrat::TimeoutError
false
end

# ==== Returns
Expand Down

0 comments on commit f956bea

Please sign in to comment.