wait_for handles disappearing elements better

This commit is contained in:
John Bintz 2012-08-28 10:01:53 -04:00
parent 0e66f6a81b
commit 899a4cb2af
1 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,9 @@ def _wait_for_exceptions
if defined?(Capybara::Driver::Webkit::Node::ElementNotDisplayedError)
exceptions << Capybara::Driver::Webkit::Node::ElementNotDisplayedError
end
if defined?(Selenium::WebDriver::Error::StaleElementReferenceError)
exceptions << Selenium::WebDriver::Error::StaleElementReferenceError
end
exceptions
end
@ -15,6 +18,9 @@ def _wait_for_not_exceptions
if defined?(Capybara::Driver::Webkit::NodeNotAttachedError)
exceptions << Capybara::Driver::Webkit::NodeNotAttachedError
end
if defined?(Selenium::WebDriver::Error::StaleElementReferenceError)
exceptions << Selenium::WebDriver::Error::StaleElementReferenceError
end
exceptions
end