Selenim 3.0 + FireFox 启动报错:'geckodriver' executabl needs to be in PATH

 

driver=webdriver.Firefox()

运行报错:

Exception AttributeError: "'Service' object has no attribute 'process'" in <boun
d method Service.__del__ of <selenium.webdriver.firefox.service.Service object a
t 0x028940B0>> ignoredgit

selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executabl needs to be in PATH.github

 

 

 

Path: https://github.com/mozilla/geckodriver/releasesweb

下载后,将geckodriver.exe复制到C:\Program Files (x86)\mozilla firefox目录下;firefox

并在环境变量Path中添加路径:C:\Program Files (x86)\mozilla firefox;blog

重启cmd,再次运行便可;cmd

相关文章
相关标签/搜索