Skip to content

Instantly share code, notes, and snippets.

@iafonov
Created May 26, 2011 10:06
Show Gist options
  • Save iafonov/992874 to your computer and use it in GitHub Desktop.
Save iafonov/992874 to your computer and use it in GitHub Desktop.
# Use @ff_with_basic_auth if you need http basic authorization
Capybara.register_driver :ff_with_basic_auth do |app|
Capybara::Driver::Selenium
profile = Selenium::WebDriver::Firefox::Profile.new
profile['network.http.phishy-userpass-length'] = 1024
Capybara::Driver::Selenium.new(app, { :profile => profile })
end
Before("@ff_with_basic_auth") do
Capybara.current_driver = :ff_with_basic_auth
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment