Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating deprecated Selenium Error classes #867

Merged
merged 2 commits into from
Dec 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/watir/elements/element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def stale?
def stale_in_context?
@element.css_value('staleness_check') # any wire call will check for staleness
false
rescue Selenium::WebDriver::Error::ObsoleteElementError
rescue Selenium::WebDriver::Error::StaleElementReferenceError
true
end

Expand Down Expand Up @@ -799,7 +799,7 @@ def element_call(precondition = nil, &block)
rescue Selenium::WebDriver::Error::StaleElementReferenceError
reset!
retry
rescue Selenium::WebDriver::Error::ElementNotVisibleError, Selenium::WebDriver::Error::ElementNotInteractableError
rescue Selenium::WebDriver::Error::ElementNotInteractableError
raise_present unless Wait.timer.remaining_time.positive?
raise_present unless %i[wait_for_present wait_for_enabled wait_for_writable].include?(precondition)
retry
Expand Down
2 changes: 1 addition & 1 deletion lib/watir/window.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def matches?(handle)

matches_title && matches_url
end
rescue Selenium::WebDriver::Error::NoSuchWindowError, Selenium::WebDriver::Error::NoSuchDriverError
rescue Selenium::WebDriver::Error::NoSuchWindowError
# the window may disappear while we're iterating.
false
end
Expand Down