selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PAT
2019-03-02 14:43
1091 查看
selenium使用Chrome时报错:
selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
1、进入页面
https://sites.google.com/a/chromium.org/chromedriver/home
2、选择合适的Chrome版本下载
3、解压下的Chromedriver放到python安装的目录下,
4、运行测试
from selenium import webdriver # 从selenium导入webdriver driver = webdriver.Chrome() # Optional argument, if not specified will search path. driver.get('https://www.baidu.com') # 获取百度页面
可以了,之前测试了好几次,安装其他目录加到环境变量还是不行,后来放到python安装目录下就好了。
相关文章推荐
- selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PAT
- selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be inPATH
- selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
- selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH
- selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
- selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH
- selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH
- selenium.common.exceptions.WebDriverException: Message: 'IEDriverServer.exe' executable needs to be
- WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
- python运行时提示WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
- 【selenium+webdriver+python】'chromedriver' executable needs to be in PATH
- python运行时提示WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
- Python3之爬虫selenium+chromedriver资源下载及“Message: 'chromedriver' executable needs to be in PATH.处理
- WebDriverException: Message: 'phantomjs.exe' executable needs to be in PATH.
- Selenium配合chromedriver提示“Message: 'chromedriver' executable needs to be in PATH.Please see ...”
- win7 python3.6+selenium3.8.1运行chromedriver提示“Message: 'chromedriver' executable needs to be in PATH
- WebDriverException:Message:'geckodriver'executable needs to be in Path
- python运行时提示WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
- WebDriverException:Message:'geckodriver'executable needs to be in Path
- Selenium配合chromedriver提示“Message: 'chromedriver' executable needs to be in PATH.Please see ...”