1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Merge pull request #2437 from RobinDaugherty/fix/invalid-session-id-during-quit

Fix failure during quit caused by Selenium raising `InvalidSessionIdError`
This commit is contained in:
Thomas Walpole 2021-01-17 17:08:25 -08:00 committed by GitHub
commit ba8772b196
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
# Version 3.34.1
Release date: unreleased
* Ignore Selenium::WebDriver::Error::InvalidSessionIdError when quitting driver [Robin Daugherty]
# Version 3.34.0
Release date: 2020-11-26

View file

@ -265,7 +265,8 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
def quit
@browser&.quit
rescue Selenium::WebDriver::Error::SessionNotCreatedError, Errno::ECONNREFUSED
rescue Selenium::WebDriver::Error::SessionNotCreatedError, Errno::ECONNREFUSED,
Selenium::WebDriver::Error::InvalidSessionIdError
# Browser must have already gone
rescue Selenium::WebDriver::Error::UnknownError => e
unless silenced_unknown_error_message?(e.message) # Most likely already gone