Top Level Namespace
Defined Under Namespace
Modules: Happo
Instance Method Summary collapse
Instance Method Details
#init_driver ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/happo/runner.rb', line 18 def init_driver tries = 0 begin driver = Selenium::WebDriver.for Happo::Utils.config['driver'].to_sym rescue Selenium::WebDriver::Error::WebDriverError => e # "unable to obtain stable firefox connection in 60 seconds" # # This seems to happen sporadically for some versions of Firefox, so we want # to retry a couple of times it in case it will work the second time around. tries += 1 retry if tries <= 3 raise e end driver.manage.timeouts.script_timeout = 3 # move to config? driver end |