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