michali
michali

Reputation: 3842

disable flash in selenium cross browser

I want to use selenium to disable flash in IE, firefox, and chrome.

is there a way to do it cross browser, and if there isn't, is there a command you know for one of them or all?

(I am using C#)

Upvotes: 1

Views: 346

Answers (1)

userpal
userpal

Reputation: 1523

For Firefox, you can try this (in Java):

FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("plugin.state.flash", 0);
FirefoxDriver driver = new FirefoxDriver(profile);

Refer to this post.

Upvotes: 2

Related Questions