相关疑难解决方法(0)

允许Chrome 61中的Flash内容通过chromedriver运行

我一直在使用它来允许闪存换铬版69.

ChromeOptions options = new ChromeOptions();
// disable ephemeral flash permissions flag
options.addArguments("--disable-features=EnableEphemeralFlashPermission");
Map<String, Object> prefs = new HashMap<>();
// Enable flash for all sites for Chrome 69
prefs.put("profile.content_settings.exceptions.plugins.*,*.setting", 1);

options.setExperimentalOption("prefs", prefs);
nestedDriver = new ChromeDriver(options);
Run Code Online (Sandbox Code Playgroud)

现在在版本71的chrome上,此实验性功能(EphemeralFlashPermission)已被删除.

我也试过使用这些设置,但它没有用.

prefs.put("profile.default_content_setting_values.plugins", 1);
prefs.put("profile.content_settings.plugin_whitelist.adobe-flash-player", 1);
prefs.put("profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player", 1);
Run Code Online (Sandbox Code Playgroud)

现在有没有其他方法可以使用chromedriver启用闪存?

flash google-chrome selenium-chromedriver

3
推荐指数
1
解决办法
7138
查看次数