zoukankan      html  css  js  c++  java
  • 最新版Google Chrome 自动加载flash插件的方法

    我们在用Selenium做自动化测试时,有时候需要浏览器自动加载flash插件,69以前的谷歌浏览器,可以通过加载属性的方法自动运行flash插件,如下:

    prefs={
            "profile.managed_default_content_settings.images":1,
            "profile.content_settings.plugin_whitelist.adobe-flash-player":1,
            "profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player":1,
               }
        chromeOpitons .add_experimental_option('prefs',prefs)

    但是69以后的高版本,为了安全性,谷歌禁止了自动加载flash插件,那么怎么办呢?下面介绍一种修改注册表的方法,让浏览器自动加载flash插件

    Windows Registry Editor Version 5.00  
    
    [HKEY_CURRENT_USERSOFTWAREPoliciesChromium]
    "AllowOutdatedPlugins"=dword:00000001 
    "RunAllFlashInAllowMode"=dword:00000001 
    "DefaultPluginsSetting"=dword:00000001 
    "HardwareAccelerationModeEnabled"=dword:00000001 
    
    [HKEY_CURRENT_USERSOFTWAREPoliciesChromiumPluginsAllowedForUrls] 
    "1"="https://*" 
    "2"="http://*" 
    
    [HKEY_LOCAL_MACHINESOFTWAREPoliciesGoogleChrome] 
    "AllowOutdatedPlugins"=dword:00000001 
    "RunAllFlashInAllowMode"=dword:00000001 
    "DefaultPluginsSetting"=dword:00000001 
    "HardwareAccelerationModeEnabled"=dword:00000001 
    
    [HKEY_LOCAL_MACHINESOFTWAREPoliciesGoogleChromePluginsAllowedForUrls] 
    "1"="https://*" 
    "2"="http://*"

    把上面代码拷贝到txt文本中,重命名以.reg结尾的文件,如:chrome自动运行flash.reg,然后双击运行这个文件就行了。

  • 相关阅读:
    网络七层协议
    discuz 使用ajax post方式传递数据,body中带有双引号会报非法字符
    处理Highcharts数据过多导致的tooltip提示框数据显示不全问题
    Python和Js打印心形
    合并区间问题
    一个继承的小问题
    kotlin学习(10)反射
    kotlin学习(9)注解
    kotlin学习(8)泛型
    kotlin学习(7)高阶函数
  • 原文地址:https://www.cnblogs.com/eastonliu/p/10782837.html
Copyright © 2011-2022 走看看