RF去掉UI自动化时的“Chrome正受到自动测试软件的控制”提示

最近做UI自动化的时候发现有些页面做了反扒校验,造成脚本执行的失败,如下图
在这里插入图片描述
去掉这个提示只需要在打开浏览器的时候加一下配置即可
options=add_argument(“–disable-blink-features=AutomationControlled”);add_experimental_option(“excludeSwitches”,[“enable-automation”])

RF脚本

Open Browser    https://www.baidu.com    gc    options=add_argument("--disable-blink-features=AutomationControlled");add_experimental_option("excludeSwitches",["enable-automation"])

python脚本

chr_options = Options()
chr_options.add_argument("--disable-blink-features=AutomationControlled")
chr_options.add_experimental_option("excludeSwitches",["enable-automation"])
dr = webdriver.Chrome(chrome_options=chr_options)

执行结果如下:
在这里插入图片描述

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值