|
|

楼主 |
发表于 2016-8-25 10:39:22
|
显示全部楼层
学习selenium过程中,求chromedriver的安装方法
本帖最后由 jfjjx 于 2016-8-25 11:00 编辑
如题哈~
我目前的安装方法是,将解压的chromedriver.exe放到与chrome.exe同级的目录"C:\Program Files (x86)\Google\Chrome\Application\"下面,然后加入环境变量"C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe"
是不是哪里不对?
网上找了很多,依葫芦画瓢但一直报错:
- Traceback (most recent call last):
- File "C:\p352\lib\site-packages\selenium\webdriver\common\service.py", line 64, in start
- stdout=self.log_file, stderr=self.log_file)
- File "C:\p352\lib\subprocess.py", line 947, in __init__
- restore_signals, start_new_session)
- File "C:\p352\lib\subprocess.py", line 1224, in _execute_child
- startupinfo)
- FileNotFoundError: [WinError 2] 系统找不到指定的文件。
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "<pyshell#9>", line 1, in <module>
- brw = wdr.Chrome()
- File "C:\p352\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__
- self.service.start()
- File "C:\p352\lib\site-packages\selenium\webdriver\common\service.py", line 71, in start
- os.path.basename(self.path), self.start_error_message)
- selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
复制代码 |
|