【问题标题】:Hardware acceleration is disabled in newer selenium/node-chrome builds在较新的 selenium/node-chrome 版本中禁用了硬件加速
【发布时间】:2021-06-21 19:08:49
【问题描述】:

我正在尝试将我们用于 selenium 测试的浏览器图像从 node-chrome:3.141.59-20201119 更新为 node-chrome:3.141.59-20210607,但是这个新版本没有像旧版本那样启用硬件加速。我知道它没有启用,因为我收到一个无情的弹出警告,它已被禁用。我们需要启用硬件加速才能让我们的测试正常运行,所以我的问题是 - 如何启用它?

这里有更多细节:

  • 我们在 docker 中使用 python 运行 selenium
  • options.add_argument('--ignore-gpu-blacklist') 无效
  • 错误是UnexpectedAlertPresentException: Alert Text: Your browser currently lacks access to Hardware-Acceleration capabilities.
  • node-chrome:3.141.59-20210128v88.0.4324.96 是硬件加速的最高版本

【问题讨论】:

    标签: python selenium selenium-webdriver selenium-chromedriver


    【解决方案1】:

    更新:

    现在是“黑名单”而不是“黑名单”

    options.add_argument('--ignore-gpu-blocklist')

    这解决了我的问题。

    https://peter.sh/experiments/chromium-command-line-switches/

    【讨论】:

      【解决方案2】:

      对我来说(无铬世界 92 和 93)命令行选项
      --enable-features=VaapiVideoDecode
      正在工作。

      source - from source

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-01-11
        • 1970-01-01
        • 2015-01-17
        • 2022-12-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-07-27
        相关资源
        最近更新 更多