Skip to content
Provides a dead-simple way to run scenarios with Firebug enabled under the selenium driver
Ruby
Find file
Latest commit 50a40df Jul 19, 2014 @jfirebaugh Release 2.1.0
Failed to load latest commit information.
features Provide 2.0.2 and 1.12.8 only Jul 19, 2014
lib Provide 2.0.2 and 1.12.8 only Jul 19, 2014
spec Provide 2.0.2 and 1.12.8 only Jul 19, 2014
.gitignore Ignore rvmrc Apr 22, 2011
.travis.yml
Gemfile Eliminate debugger hassle Oct 23, 2013
LICENSE Initial commit Mar 6, 2011
README.md Provide 2.0.2 and 1.12.8 only Jul 19, 2014
Rakefile Run both spec and cucumber tasks by default. Mar 30, 2011
capybara-firebug.gemspec Release 2.1.0 Jul 19, 2014

README.md

capybara-firebug provides a dead-simple way to run Capybara-based Cucumber scenarios or RSpec request specs with Firebug enabled under the selenium driver.

To use it in RSpec examples, require 'capybara/firebug/rspec' in spec_helper.rb, and tag the examples you need to debug with :firebug => true.

To use it in Cucumber scenarios, require 'capybara/firebug/cucumber' in env.rb, and tag the scenarios you need to debug with @firebug.

Firebug Versions

By default, this gem uses Firebug 2.0.2, which is compatible with Firefox 30-32.

If you want to use Firebug 1.12.8 (compatible with Firefox 23+), you need to explicitly specify the firebug_version setting in your capybara.rb support file:

# located in features/support/capybara.rb or similar
require 'capybara/firebug'
Selenium::WebDriver::Firefox::Profile.firebug_version = '1.12.8'

Customizing the Profile

If you wish to further customize the Firefox profile used by selenium, you can use the #enable_firebug method to add the Firebug extension to it:

profile = Selenium::WebDriver::Firefox::Profile.new
profile.enable_firebug

This can also be used to enable Firebug on a remote browser:

Capybara::Driver::Selenium.new(app,
   :browser => :remote,
   :url => "http://my.ip.add.ress:4444/wd/hub",
   :desired_capabilities => Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile => profile))

Upgrading from 1.x

Cucumber and RSpec support has been split into separate files. You'll need to change spec_helper.rb to require 'capybara/firebug/rspec' or env.rb to require 'capybara/firebug/cucumber'.

A "stop and let me debug" step definition is no longer provided. You can add it yourself if needed:

Then /^stop and let me debug$/ do
  debugger
end

Ruby 1.8.x is no longer supported. Please upgrade to 2.0 or later.

Something went wrong with that request. Please try again.