Blog Archives

How to Get Firebug, Capybara and Selenium Working Together

Posted in Inside TFG

I had an issue whereby a label I thought was fine wasn’t being picked up on my Cucumber tests. It turned out that the test environment was of course running our compiled javascript and I hadn’t compiled it since my change. The labels didn’t have the ‘for’ attribute specified so Selenium was whinging it couldn’t find the element I wanted to find.

In any case I couldn’t find an explanation of how to get Firebug working with Selenium and Capybara but after some doc reading I got my solution working so I thought I’d post it here.

In my env.rb file I have :

Capybara.register_driver :selenium do |app|
  Capybara::Driver::Selenium
  profile = Selenium::WebDriver::Firefox::Profile.new
  profile.add_extension(File.expand_path("features/support/firebug.xpi"))

  Capybara::Driver::Selenium.new(app, { :browser => :firefox, :profile => profile })
end

jQuery Firebug Plugin

Posted in Websites or Tools

Debugging most things that include a jQuery chain can be annoying at best and virtually impossible at worst. Now there is a jQuery Firebug Plugin that helps when debugging Javascript that uses jQuery and it seems to do it very well! The plugin allows you to call debug(), assert(), log() or any other Firebug 1.2 call at any point in your chain. Fantastic!.

There are examples in the article of how to use jQuery.Firebug() so I suggest taking a peak.

Twitter

The latest @rubyfive podcast is up, our own @sj26 receiving a mention for Ruby 1.9.3 performance improvements. http://t.co/hfx3EPMz

@frontiergroup about 4 days ago #

Search Posts

Featured Posts

Categories

Archives

View more archives