Skip to content

Instantly share code, notes, and snippets.

@estahn
Created July 6, 2011 11:20
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save estahn/1067020 to your computer and use it in GitHub Desktop.
Save estahn/1067020 to your computer and use it in GitHub Desktop.
Run Cucumber with Selenium RC and a custom Firefox profile
if ENV.key?('SELENIUM_REMOTE')
Capybara.register_driver :selenium do |app|
require 'selenium-webdriver'
profile = Selenium::WebDriver::Firefox::Profile.from_name 'default'
capabilities = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile => profile)
Capybara::Selenium::Driver.new(app, { :browser => :remote, :desired_capabilities => capabilities })
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment