Sha256: 1d553543e1600761287a2743e2fb11eca1c0b0575748acab9a35da9a72819405

Contents?: true

Size: 1.81 KB

Versions: 4

Compression:

Stored size: 1.81 KB

Contents

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

1. Install the gem
2. `require 'capybara/firebug'` in env.rb or spec_helper.rb
3. Tag the tests you need to debug:
  - Tag Cucumber scenarios with `@firebug`
  - Tag RSpec examples with `:firebug => true`
4. Run 'em

Firebug will be set up so that all features are fully enabled on every page.

You'll want to be able to pause the scenario at some point to inspect things
in Firebug. A step definition for `Then stop and let me debug` is provided
for this purpose. When executed, it breaks in the Ruby debugger. (If you are
using bundler, you will also need to specify the correct debugging gem in your
Gemfile: `gem 'ruby-debug'` for 1.8, `gem 'ruby-debug19'` for 1.9.)

## Firebug Versions

By default, this gem uses Firebug 1.10.2, which is compatible with Firefox 13-16.

If you want to use Firebug 1.7.3 (compatible with Firefox 3.6, 4, and 5) or 1.9.1
(compatible with Firefox 6-13), 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.7.3'

## 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))

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
capybara-firebug-1.2.3 README.md
capybara-firebug-1.2.2 README.md
capybara-firebug-1.2.1 README.md
capybara-firebug-1.2.0 README.md