lib/billy/browsers/capybara.rb in puffing-billy-1.1.3 vs lib/billy/browsers/capybara.rb in puffing-billy-2.0.0
- old
+ new
@@ -5,11 +5,12 @@
class Capybara
DRIVERS = {
poltergeist: 'capybara/poltergeist',
webkit: 'capybara/webkit',
- selenium: 'selenium/webdriver'
+ selenium: 'selenium/webdriver',
+ apparition: 'capybara/apparition'
}
def self.register_drivers
DRIVERS.each do |name, driver|
begin
@@ -63,8 +64,15 @@
options: options
)
end
end
+ def self.register_apparition_driver
+ ::Capybara.register_driver :apparition_billy do |app|
+ ::Capybara::Apparition::Driver.new(app, ignore_https_errors: true).tap do |driver|
+ driver.set_proxy(Billy.proxy.host, Billy.proxy.port)
+ end
+ end
+ end
end
end
end