Skip to content

Commit

Permalink
Don't rename already specific errors in Safari driver
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Jun 11, 2019
1 parent d06378a commit a13eaa6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/capybara/selenium/nodes/safari_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ def click(keys = [], **options)
return find_css('th:first-child,td:first-child')[0].click(keys, options)
end
raise
rescue ::Selenium::WebDriver::Error::WebDriverError
rescue ::Selenium::WebDriver::Error::WebDriverError => e
raise unless e.instance_of? ::Selenium::WebDriver::Error::WebDriverError

# Safari doesn't return a specific error here - assume it's an ElementNotInteractableError
raise ::Selenium::WebDriver::Error::ElementNotInteractableError,
'Non distinct error raised in #click, translated to ElementNotInteractableError for retry'
Expand Down
4 changes: 4 additions & 0 deletions lib/capybara/spec/test_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ def initialize(string1, msg)
end
end

get '/apple-touch-icon-precomposed.png' do
halt(404)
end

class << self
attr_accessor :form_post_count
end
Expand Down

0 comments on commit a13eaa6

Please sign in to comment.