【发布时间】:2015-08-07 14:34:00
【问题描述】:
为 Chrome 使用了以下代码...但是 Chrome 没有禁用 Flash .. 甚至我也需要 IE 的代码
ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("profile.default_content_settings.state.flash",0);
//profile.default_content_settings.popups
options.setExperimentalOption("prefs", prefs);
System.setProperty("webdriver.chrome.driver",System.getProperty("user.dir")+"\\chromedriver.exe");
driver = new ChromeDriver(options);
【问题讨论】:
-
您是要禁用 Adobe 的 flash 插件还是 Chrome 的捆绑 flash?
-
Adobe Flash Player..我还需要 IE 的代码..那会很有帮助
-
您可以disable external plugins,从而禁用Adobe Flash Player,也可以disable specifically Adobe's plugin。不过,我不了解 IE。
-
谢谢...你能提供 Chrome 的代码吗...