selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PAT

在pycharm中运行程序:

from selenium import webdriver
driver = webdriver.Chrome()
driver.get("http://www.baidu.com")

出现问题下面问题:
selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PAT_第1张图片
将chromedriver.exe放入这个目录成功解决!
要把chromedriver放到python安装路径下就可以了,不要放到chrome安装目录下,没有起作用

你可能感兴趣的:(selenium,chrome,python)