Created
February 29, 2012 01:02
-
-
Save timlinquist/1936685 to your computer and use it in GitHub Desktop.
Use default profile w/selenium webdriver
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
# Excerpt from features/env.rb for customizing selenium to be ran via capybara | |
....... | |
require 'cucumber/rails' | |
require 'selenium-webdriver' | |
# Use default profile for Firefox | |
# By default, selenium uses an anonymous profile so none of your settings will be enabled | |
# It is smart to setup a 'selenium' or 'test' profile to reduce the configurations you | |
# would set as a normal user of Firefox. | |
# | |
# Setting up profiles in Firefox: http://support.mozilla.org/en-US/kb/Profiles | |
# | |
# Also a list of supported browsers for selenium-webdriver: | |
# - Android | |
# - Chrome | |
# - Firefox | |
# - IE | |
# - IPhone | |
# - Opera | |
Capybara.register_driver :custom_selenium do |app| | |
Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => 'default') | |
end | |
Capybara.default_driver = :custom_selenium | |
..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment