【发布时间】:2018-02-03 10:51:56
【问题描述】:
我对 selenium 完全陌生,当我编写这段代码时,我从 chrome 中收到一个错误,提示“chrome 驱动程序已停止工作”,它要求我关闭 chrome。
from selenium import webdriver
chrome_path="C:\Python27\Scripts\chromedriver.exe"
driver=webdriver.Chrome(chrome_path)
driver.get("https://www.google.com")
在我的 IDLE 中执行这一行之后
driver=webdriver.Chrome(chrome_path)
Chrome 打开,但显示“您正在使用不受支持的命令行标志:-- 忽略证书错误。稳定性和安全性将受到影响。”它会弹出一个对话框告诉我“禁用开发者模式扩展”
在我输入这一行之后
driver.get("https://www.google.com")
出现一个对话框,说 chromedriver.exe 已停止工作,它给了我一个关闭程序的按钮。有时这不会立即出现,我在 IDLE GUI 上遇到这样的错误。 Click me for the error image
一些细节:-
Chrome 版本:- 60.0.3112.101
chromedriver 版本:- 2.9.248315
Python 版本:- 2.7.13
【问题讨论】:
-
@SaurabhGaur 非常感谢,这解决了我的问题!
标签: python-2.7 google-chrome selenium selenium-chromedriver