Skip to content

Commit

Permalink
Add :selenium_chrome_billy driver config
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotsykes committed Mar 6, 2015
1 parent 0eee0aa commit c48bc57
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ In your `spec_helper.rb`:
require 'billy/rspec'

# select a driver for your chosen browser environment
Capybara.javascript_driver = :selenium_billy
Capybara.javascript_driver = :selenium_billy # Uses Firefox
# Capybara.javascript_driver = :selenium_chrome_billy
# Capybara.javascript_driver = :webkit_billy
# Capybara.javascript_driver = :poltergeist_billy
```
Expand Down
10 changes: 10 additions & 0 deletions lib/billy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ def self.register_drivers
ssl: "#{Billy.proxy.host}:#{Billy.proxy.port}")
Capybara::Selenium::Driver.new(app, profile: profile)
end

Capybara.register_driver :selenium_chrome_billy do |app|
Capybara::Selenium::Driver.new(
app,
:browser => :chrome,
:switches => [
"--proxy-server '#{Billy.proxy.host}:#{Billy.proxy.port}'"
]
)
end
end
end
end

0 comments on commit c48bc57

Please sign in to comment.