Skip to content

Instantly share code, notes, and snippets.

@mathiasschopmans
Created May 4, 2015 13:07
Show Gist options
  • Save mathiasschopmans/ec7cf44b8149549a5c70 to your computer and use it in GitHub Desktop.
Save mathiasschopmans/ec7cf44b8149549a5c70 to your computer and use it in GitHub Desktop.
Ignore Capybara SSL verification (https errors) and add Capybara Screenshot functionality
Capybara.register_driver :webkit_ignore_ssl do |app|
Capybara::Webkit::Driver.new(app).tap {|d| d.browser.ignore_ssl_errors }
end
Capybara::Screenshot.register_driver(:webkit_ignore_ssl) do |driver, path|
driver.save_screenshot(path)
end
Capybara.javascript_driver = :webkit_ignore_ssl
Capybara.default_driver = :webkit_ignore_ssl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment