当前我们遇到这样的问题,就要通过代码的层面去解决
requests的话verify参数设置为False
selenium的话添加参数:--ignore-certificate-errors
测试代码:
关于跑完自动化用例,会自动关闭浏览器的解决方法
#加启动配置
option = webdriver.ChromeOptions()
#关闭“chrome正受到自动测试软件的控制”
#V75以及以下版本
#option.add_argument(\'disable-infobars\')
#V76以及以上版本
option.add_experimental_option(\'useAutomationExtension\', False)
option.add_experimental_option(\'excludeSwitches\', [\'enable-automation\'])
#不自动关闭浏览器
option.add_experimental_option("detach", True)
# 打开chrome浏览器
driver = webdriver.Chrome(chrome_options=option)
return driver