The elusive firebug. |
firebug.xpi
file from https://addons.mozilla.org/en-US/firefox/addon/firebug/ by right-clicking on the + Add to Firefox button and saving the file.2.) Place the
firebug.xpi
file in the root directory of your cucumber (or watir-webdriver) directory - the same level as your cucumber.yml
. (I did this just so I wouldn't have / \ issues going between linux and Windows. It's a quick and dirty solution.)3.) Add the following code to your
env.rb
or wherever you are instantiating your browser object:debug_profile = Selenium::WebDriver::Firefox::Profile.new debug_profile.add_extension "firebug-1.9.1-fx.xpi" browser = Watir::Browser.new :firefox, :profile => debug_profile
Now when you run watir-webdriver, you will find you have Firebug available.
One gotcha I encountered was I saved the
firebug.xpi
file using Chrome. It was corrupted, and I was getting an error about the zipfile not having an end. So if you see that, re-download the file. Preferably using Firefox.
No comments:
Post a Comment