Merge pull request #1962 from tlconnor/rescueSessionNotCreated

Rescue SessionNotCreatedError during Capybara::Selenium::Driver#quit
This commit is contained in:
Thomas Walpole 2018-02-12 12:33:22 -08:00 committed by GitHub
commit 973a1f2605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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