Allow Flash content in Chrome 71 running via chromedriver

后端 未结 2 1304
一生所求
一生所求 2020-12-09 00:11

I\'ve been using this to allow flash for chrome version 69.

ChromeOptions options = new ChromeOptions();
// disable ephemeral flash permissions flag
options.         


        
2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-09 00:59

    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.

提交回复
热议问题