在selenium跨浏览器中禁用flash

时间:2014-07-13 14:02:17

标签: c# flash

我想使用selenium来禁用IE,firefox和chrome中的flash。

有没有办法通过浏览器进行操作,如果没有,是否有一个命令你知道其中一个或全部?

(我正在使用C#)

1 个答案:

答案 0 :(得分:2)

对于Firefox,你可以试试这个(用Java):

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

请参阅this post