zoukankan      html  css  js  c++  java
  • 关于selenium无法在chrome中自动播放flash的问题

    最近用selenium写个小脚本,遇到flash不能自动播放问题

    我遇到的情况,直接提示 请确认是否安装flash,其实已经安装,点击下载flash,然后提示是否允许。 整了好久,发现终极方法:

    ## 71.0 以上 ##
    从71.0开始,Flash插件的Ephemeral模式不可关闭。
    修改允许名单,要动用“Chrome政策模板”,对Windows来说最终就是注册表。
    请注意这是一项危险操作:

    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USERSoftwarePoliciesGoogleChromePluginsAllowedForUrls]
    "1"="[*.]com"
    "2"="[*.]net"
    "3"="[*.]org"
    "4"="[*.]cn"
    

    写入注册表后,重启Chrome。进入chrome://settings/content/flash即可看到效果。

    原文:https://www.zhihu.com/question/266170237
    ------------------------------------------------------------------------
    2019年11月22日 发现以上方法针对chrome 78版本无效。于是用下面的注册表内容:
     
    作者:Galaxy
    链接:https://www.zhihu.com/question/266170237/answer/562684845
    来源:知乎
    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

    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://*"
  • 相关阅读:
    netty的基本使用
    netty 实现简单的rpc调用
    NIO 的基本使用
    BIO实现 Socket 通信
    springboot使用ElasticSearch
    docker-compose安装rabbitmq集群(主从集群---》镜像集群)
    杂谈:面向微服务的体系结构评审中需要问的三个问题
    使用Spring Boot和RxJava的构建响应式REST API
    JVM体系结构详解
    如何成为更好的程序员?
  • 原文地址:https://www.cnblogs.com/b1gstar/p/10496028.html
Copyright © 2011-2022 走看看