Skip to content

Commit

Permalink
fix selenium webdriver deprecation warning
Browse files Browse the repository at this point in the history
:args or :switches has been deprecated. The recommended approach is to
use Selenium::WebDriver::Chrome::Options#add_argument instead
  • Loading branch information
rounders committed Sep 27, 2017
1 parent 811ae23 commit 9d25d17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/billy/browsers/capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ def self.register_selenium_driver
end

::Capybara.register_driver :selenium_chrome_billy do |app|
options = Selenium::WebDriver::Chrome::Options.new
options.add_argument("--proxy-server=#{Billy.proxy.host}:#{Billy.proxy.port}")

::Capybara::Selenium::Driver.new(
app, browser: :chrome,
switches: ["--proxy-server=#{Billy.proxy.host}:#{Billy.proxy.port}"]
options: options
)
end
end
Expand Down

0 comments on commit 9d25d17

Please sign in to comment.