Class: Capybara::Selenium::Driver
- Inherits:
-
Object
- Object
- Capybara::Selenium::Driver
- Defined in:
- lib/cukeforker-webdriver/capybara/driver.rb
Instance Method Summary collapse
Instance Method Details
#browser ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/cukeforker-webdriver/capybara/driver.rb', line 5 def browser unless @browser @port = ENV['web_driver_port'] [:port] = @port @browser = Selenium::WebDriver::Driver.new(CukeForker::WebDriver::NoLockFirefoxBridge.new(.reject { |key,val| SPECIAL_OPTIONS.include?(key)})) main = Process.pid at_exit do quit if Process.pid == main end end @browser end |
#quit ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/cukeforker-webdriver/capybara/driver.rb', line 19 def quit begin @browser.quit rescue Errno::ECONNREFUSED ensure end end |