开发者

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

开发者 https://www.devze.com 2023-03-07 07:32 出处:网络
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.

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


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


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.


profile = Selenium::WebDriver::Firefox::Profile.new
profile.add_extension "/path/to/firebug.xpi"
browser = Watir::Browser.new :firefox, :profile => profile
0

精彩评论

暂无评论...
验证码 换一张
取 消