Created
November 29, 2011 14:53
-
-
Save attilagyorffy/1405063 to your computer and use it in GitHub Desktop.
Capybara, with Selenium and Firebug
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 :selenium do |app| | |
Capybara::Selenium::Driver # this line ensures that the top level Selenium module is loaded | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
profile.add_extension File.expand_path "spec/support/vendor/firebug-1.8.4-fx.xpi" | |
profile.add_extension File.expand_path "spec/support/vendor/fireStarter-0.1a6.xpi" | |
profile.add_extension File.expand_path "spec/support/vendor/netExport-0.8b20.xpi" | |
# Configures Firebug - look at http://getfirebug.com/developer/api/firebug1.6/symbols/src/defaults_preferences_firebug.js.html | |
profile['extensions.firebug.currentVersion'] = "1.8.4" # avoid 'first run' tab | |
profile["extensions.firebug.previousPlacement"] = 1 | |
profile["extensions.firebug.onByDefault"] = true | |
profile["extensions.firebug.net.enableSites"] = true # Enables the Net Panel | |
profile["extensions.firebug.defaultPanelName"] = "net" # sets the default pane to Net for easier access | |
Capybara::Selenium::Driver.new(app, { :browser => :firefox, :profile => profile }) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment