Skip to content

Commit

Permalink
Swap to using :options for remote driver config
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Nov 7, 2018
1 parent 9e15cf9 commit 9a69ced
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions spec/selenium_spec_chrome_remote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ def selenium_gte?(version)
ensure_selenium_running!

url = "http://#{selenium_host}:#{selenium_port}/wd/hub"
caps = Selenium::WebDriver::Remote::Capabilities.chrome
browser_options = ::Selenium::WebDriver::Chrome::Options.new

Capybara::Selenium::Driver.new app,
browser: :remote,
desired_capabilities: caps,
desired_capabilities: :chrome,
options: browser_options,
url: url
end

Expand Down
5 changes: 3 additions & 2 deletions spec/selenium_spec_firefox_remote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ def ensure_selenium_running!
ensure_selenium_running!

url = "http://#{selenium_host}:#{selenium_port}/wd/hub"
caps = Selenium::WebDriver::Remote::Capabilities.firefox
browser_options = ::Selenium::WebDriver::Firefox::Options.new

Capybara::Selenium::Driver.new app,
browser: :remote,
desired_capabilities: caps,
desired_capabilities: :firefox,
options: browser_options,
url: url
end

Expand Down

0 comments on commit 9a69ced

Please sign in to comment.