Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get watir-webdriver to start Firefox 4 with Firebug?

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

like image 627
Richard Finegan Avatar asked May 19 '11 21:05

Richard Finegan


3 Answers

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

like image 74
Grooveek Avatar answered Oct 21 '22 11:10

Grooveek


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.

like image 29
juan2raid Avatar answered Oct 21 '22 11:10

juan2raid


profile = Selenium::WebDriver::Firefox::Profile.new
profile.add_extension "/path/to/firebug.xpi"
browser = Watir::Browser.new :firefox, :profile => profile
like image 23
Stepan Avatar answered Oct 21 '22 11:10

Stepan