Chrome 62 and Flash

Allow Flash content in Chrome 71 running via chromedriver

I haven't find any option yet, and I'm afraid won't find ever.

The workaround for Windows is to use Group Policies (via adding entries to registry):

reg add HKLM\Software\Policies\Google\Chrome /v DefaultPluginsSetting /d 1 /t REG_DWORD /f
reg add HKLM\Software\Policies\Google\Chrome\PluginsAllowedForUrls /v 1 /d http://* /t REG_SZ /f
reg add HKLM\Software\Policies\Google\Chrome\PluginsAllowedForUrls /v 2 /d https://* /t REG_SZ /f

or just create file with .reg extension and put text below into it:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google]

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
"DefaultPluginsSetting"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\PluginsAllowedForUrls]
"1"="http://*"
"2"="https://*"

then save and double-click this file.

Allow Flash content in Chrome 69 running via chromedriver

Thanks everyone for answers.

I finally have found the solution. In order to enable flash progrmatically since Chrome 69 we have to do 2 things:

  1. Disable Ephemeral Flash Permissions (to enable list of allowed for
    Flash sites) and
  2. Add all sites to that list.

See the following code on Java:

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);


Related Topics



Leave a reply



Submit