RF去掉UI自动化时的“Chrome正受到自动测试软件的控制”提示
最近做UI自动化的时候发现有些页面做了反扒校验,造成脚本执行的失败,如下图去掉这个提示只需要在打开浏览器的时候加一下配置即可options=add_argument(“–disable-blink-features=AutomationControlled”);add_experimental_option(“excludeSwitches”,[“enable-automation”])RF脚本O
·
最近做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)
执行结果如下:
更多推荐



所有评论(0)