7

Any ideas? I've tried setting webdriver.firefox.useExisting=true as described in the link below hoping to reuse an existing window with firebug enabled, but no such luck.

http://code.google.com/p/selenium/wiki/FirefoxDriver

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
Richard Finegan
  • 1,895
  • 2
  • 12
  • 8

3 Answers3

6

you have to create a specific profile where Firebug is always enabled, then launch firefox with this profile in your configuration

Grooveek
  • 10,046
  • 1
  • 27
  • 37
5

The quick answer is:

browser = Watir::Browser.new(:firefox, :profile => "default")

But if you are running tests you probably shouldn't use the default profile.

juan2raid
  • 1,606
  • 1
  • 18
  • 29
  • 3
    The longer answer is on the wiki page for the WebDriver Ruby bindings: http://code.google.com/p/selenium/wiki/RubyBindings#Adding_an_extension – jarib May 21 '11 at 13:59
1
profile = Selenium::WebDriver::Firefox::Profile.new
profile.add_extension "/path/to/firebug.xpi"
browser = Watir::Browser.new :firefox, :profile => profile
Stepan
  • 342
  • 1
  • 4
  • 12