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:
commit
ba8772b196
2 changed files with 7 additions and 1 deletions
|
@ -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
|
# Version 3.34.0
|
||||||
Release date: 2020-11-26
|
Release date: 2020-11-26
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,8 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
|
||||||
|
|
||||||
def quit
|
def quit
|
||||||
@browser&.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
|
# Browser must have already gone
|
||||||
rescue Selenium::WebDriver::Error::UnknownError => e
|
rescue Selenium::WebDriver::Error::UnknownError => e
|
||||||
unless silenced_unknown_error_message?(e.message) # Most likely already gone
|
unless silenced_unknown_error_message?(e.message) # Most likely already gone
|
||||||
|
|
Loading…
Add table
Reference in a new issue