我想使用selenium来禁用IE,firefox和chrome中的flash。
有没有办法通过浏览器进行操作,如果没有,是否有一个命令你知道其中一个或全部?
(我正在使用C#)
答案 0 :(得分:2)
对于Firefox,你可以试试这个(用Java):
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("plugin.state.flash", 0);
FirefoxDriver driver = new FirefoxDriver(profile);
请参阅this post。