Created
May 4, 2015 13:07
-
-
Save mathiasschopmans/ec7cf44b8149549a5c70 to your computer and use it in GitHub Desktop.
Ignore Capybara SSL verification (https errors) and add Capybara Screenshot functionality
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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