You are using an unsupported command-line flag --ignore-certificate-errors. Stability and security w

来源:互联网 发布:天下3捏脸大赛数据 编辑:程序博客网 时间:2024/05/17 03:46

环境:ubuntu14.04,python2.7, selenium3.0.1, Google Chrome 52.0.2743.116(64-bit)

在学习selenium时拷贝别人的代码执行报错,原因应该在这一句:driver = webdriver.Chrome()

在打开的chrome窗口中显示错误:You are using an unsupported command-line flag --ignore-certificate-errors. Stability and security will suffer

解决办法:

忽略掉错误,driver部分改为:

from selenium.webdriver.common.desired_capabilities import DesiredCapabilitiesoptions = webdriver.ChromeOptions()options.add_argument("--test-type")# 初始化一个webdriverdriver = webdriver.Chrome(chrome_options=options)
恩,改了之后,虽然原来的功能还没完成,但是确实没有提示错误了

0 0