Sha256: ebaf03f2bae23176f45de8a313fe10de7a8f8d47001e8581e1d358863b5df0c7
Contents?: true
Size: 1.2 KB
Versions: 2
Compression:
Stored size: 1.2 KB
Contents
require 'selenium/webdriver' class Selenium::WebDriver::Firefox::Profile def self.firebug_version @firebug_version ||= '1.8.4' end def self.firebug_version=(version) @firebug_version = version end def enable_firebug(version = nil) version ||= Selenium::WebDriver::Firefox::Profile.firebug_version add_extension(File.expand_path("../firebug-#{version}.xpi", __FILE__)) # Prevent "Welcome!" tab self["extensions.firebug.currentVersion"] = "999" # Enable for all sites. self["extensions.firebug.allPagesActivation"] = "on" # Enable all features. ['console', 'net', 'script'].each do |feature| self["extensions.firebug.#{feature}.enableSites"] = true end # Closed by default. self["extensions.firebug.previousPlacement"] = 3 end end Capybara.register_driver :selenium_with_firebug do |app| profile = Selenium::WebDriver::Firefox::Profile.new profile.enable_firebug Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => profile) end if defined?(Cucumber::RbSupport) Before '@firebug' do Capybara.current_driver = :selenium_with_firebug end Then /^stop and let me debug$/ do require 'ruby-debug' debugger end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
capybara-firebug-1.0.1 | lib/capybara/firebug.rb |
capybara-firebug-1.0.0 | lib/capybara/firebug.rb |