How to run Chrome / Firefox with the watchir script plugin disabled?

How to run Chrome / Firefox with the watchir script plugin disabled?

If I turn off the flash in Chrome, the next time I run watir-webdriver the script Flash will turn on again.

+3
source share
2 answers

For Firefox, it's easy. Disable Flash in your default profile (the one you usually use), and then launch the browser as follows:

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

Additional information: http://watirwebdriver.com/firefox/

For Chrome, I thought it would be done, but it looks like I'm doing something wrong, since the flash is on:

browser = Watir::Browser.new :chrome, :switches => ["--disable-internal-flash"]

Additional information: http://watirwebdriver.com/chrome/

, , Flash Chrome:

browser.goto "about:plugins"
browser.span(:text => "Flash").parent.parent.parent.a(:text => "Disable", :class => "disable-group-link").click
+6

--disable-bundled-ppapi-flash. .

0

All Articles