Skip to content

Commit

Permalink
allow passing selenium options
Browse files Browse the repository at this point in the history
  • Loading branch information
odedniv committed Feb 9, 2018
1 parent f5b67a2 commit b43880f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/teaspoon/driver/selenium.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def initialize(options = nil)
end

def run_specs(runner, url)
driver = ::Selenium::WebDriver.for(driver_options[:client_driver])
driver = ::Selenium::WebDriver.for(driver_options[:client_driver], **driver_options[:selenium_options].to_options)
driver.navigate.to(url)

::Selenium::WebDriver::Wait.new(driver_options).until do
Expand All @@ -44,7 +44,8 @@ def driver_options
client_driver: :firefox,
timeout: Teaspoon.configuration.driver_timeout.to_i,
interval: 0.01,
message: "Timed out"
message: "Timed out",
selenium_options: {},
).merge(@options)
end
end
Expand Down

0 comments on commit b43880f

Please sign in to comment.