标签:配置环境变量 path proc site self python2 lib sel common
错误代码:
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
标签:配置环境变量 path proc site self python2 lib sel common
原文地址:http://www.cnblogs.com/nero3/p/7616138.html