Skip to content

Commit

Permalink
Squash WebDriverError in selenium driver when accessing sessionStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Apr 13, 2024
1 parent 0f15ddd commit 56c45cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/capybara/selenium/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def delete_all_cookies
def clear_storage
clear_session_storage unless options[:clear_session_storage] == false
clear_local_storage unless options[:clear_local_storage] == false
rescue Selenium::WebDriver::Error::JavascriptError
rescue Selenium::WebDriver::Error::JavascriptError, Selenium::WebDriver::Error::WebDriverError
# session/local storage may not be available if on non-http pages (e.g. about:blank)
end

Expand Down

0 comments on commit 56c45cb

Please sign in to comment.