首页 > 编程语言 > 详细

python.错误记录 selenium.common.exceptions.WebDriverException

时间:2017-09-30 21:33:22      阅读:4224      评论:0      收藏:0      [点我收藏+]

错误代码:

Traceback (most recent call last): browser = webdriver.Chrome(‘C:\Program Files (x86)\Google\Chrome\Application\chrome.exe‘)
File "D:\Python27\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__
self.service.start()
File "D:\Python27\lib\site-packages\selenium\webdriver\common\service.py", line 96, in start
self.assert_process_still_running()
File "D:\Python27\lib\site-packages\selenium\webdriver\common\service.py", line 109, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service C:\Program Files (x86)\Google\Chrome\Application\chrome.exe unexpectedly exited. Status code was: 0

解决:

browser = webdriver.Chrome() #括号内输入chromedriver的路径

或者配置环境变量Path

python.错误记录 selenium.common.exceptions.WebDriverException

原文:http://www.cnblogs.com/nero3/p/7616138.html

(1)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!