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,然后双击运行这个文件就行了。

  • 相关阅读:
    带下拉子菜单的导航菜单
    如何使用myFocus插件制作焦点图效果
    将博客搬至CSDN
    《转》二进制与三进制的那些趣题
    二叉树遍历 (前序 层次 == 深度 广度) 层次遍历
    数组全排列 knuth 分解质因数
    堆排序
    双向快速排序
    二路归并排序
    字符串的排列
  • 原文地址:https://www.cnblogs.com/eastonliu/p/10782837.html
Copyright © 2011-2022 走看看