Class: Capybara::Selenium::Driver
- Inherits:
-
Driver::Base
- Object
- Driver::Base
- Capybara::Selenium::Driver
- Defined in:
- lib/simulacrum/browserstack/capybara_patch.rb
Overview
Monkey patch the Capybara Driver class to ensure that we can call quit at the end of a parallel process run and not generate errors if capybara then attempts to quit.
We need to do this so that sessions are terminated as early as possible at the remote end.
Instance Method Summary collapse
Instance Method Details
#quit ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/simulacrum/browserstack/capybara_patch.rb', line 12 def quit @browser.quit if @browser rescue Errno::ECONNREFUSED, ::Selenium::WebDriver::Error::UnknownError # Browser must have already gone ensure @browser = nil end |