当前位置: 代码迷 >> 综合 >> 【Serenity BDD】使用ChromeDriver打开Chrome浏览器是弹出“Chrome is being controlled by automated software”提示栏
  详细解决方案

【Serenity BDD】使用ChromeDriver打开Chrome浏览器是弹出“Chrome is being controlled by automated software”提示栏

热度:29   发布时间:2024-01-19 23:43:25.0

【问题】:

       Serenity 2.0.71(对应Chrome v77)版本中以往Chrome 禁用消息栏的配置已经失效,排查很久才知道是配置项变更导致

【解决】:

  1. 找到框架的配置文件 “serenity.conf” 或者“serenity.properties”;
  2. 选择其中一个配置文件,复制如下配置到对应配置文件中:

serenity.conf

chrome_experimental_options {excludeSwitches = "enable-automation"useAutomationExtension = false
}

 serenity.properties:

chrome_experimental_options.useAutomationExtension=false
chrome_experimental_options.excludeSwitches=[enable-automation]

 

  相关解决方案