ignore another error while quitting selenium-webdriver

This commit is contained in:
Thomas Walpole 2016-10-13 09:47:10 -07:00
parent 4a1f558851
commit c64ca0f3cd
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
#Edge
Release data: unreleased
### Fixed
* Ignore specific error when qutting selenium driver instance - Issue #1773 [Dylan Reichstadt\, Thomas Walpole]
#2.10.1
Release date: 2016-10-08

View File

@ -242,6 +242,9 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
@browser.quit if @browser
rescue Errno::ECONNREFUSED
# Browser must have already gone
rescue Selenium::WebDriver::Error::UnknownError => e
raise unless e.message =~ /Error communicating with the remote browser/
# probably already gone
ensure
@browser = nil
end