在学习selenium自动化过程中,遇到的关于chromedriver下载安装的问题,在此简单总结下:

下载安装步骤:

1、安装selenium直接在终端执行命令:pip install selenium

2、chrome浏览器驱动下载地址:http://chromedriver.storage.googleapis.com/index.html

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 83
问题1: Message: ‘chromedriver’ executable needs to be in PATH
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home
csrutil disablecsrutil enablesudo mv chromedriver /usr/local/bincd /usr/local/binsudo chmod a+x chromedriverchromedriver
问题2:Message: unknown error: cannot find Chrome binary
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary