文章目录
selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH
- selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH
- TypeError: 'FirefoxWebElement' object is not iterable
安装selenium的话,使用pip即可:pip install selenium
但是安装成功后运行会报错:selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH.
主要原因可能是没有安装对应的浏览器驱动程序。
我常使用Firefox,其对应驱动的Github地址