C# 在浏览器中禁用flash

C# 在浏览器中禁用flash,c#,flash,C#,Flash,我想使用selenium在IE、firefox和chrome中禁用flash 有没有跨浏览器执行此操作的方法?如果没有,您知道其中一个或全部的命令 (我正在使用C#)用于Firefox,您可以尝试以下方法(在Java中): 参考 FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("plugin.state.flash", 0); FirefoxDriver driver = new FirefoxDriver

我想使用selenium在IE、firefox和chrome中禁用flash

有没有跨浏览器执行此操作的方法?如果没有,您知道其中一个或全部的命令


(我正在使用C#)

用于Firefox,您可以尝试以下方法(在Java中):

参考

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