基于python 3 的selenium模块实现网页自动登陆
[Python爬虫] Selenium自动访问Firefox和Chrome并实现搜索截图
python-selenium-firefox环境搭建时常遇到的小问题
firefox 报错“os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH”的解决办法:
1. selenium 3.x开始,webdriver/firefox/webdriver.py的__init__中,executable_path="geckodriver";而2.x是executable_path="wires"
2. firefox 47以上版本,需要下载第三方driver,即geckodriver;在http://docs.seleniumhq.org/download/的Third Party Drivers, Bindings, and Plugins下面找到Mozilla GeckoDriver,下载到任意电脑任意目录,解压后将该路径加入到PC的path(针对windows)即可。
示例:
本文转自 326647452 51CTO博客,原文链接:http://blog.51cto.com/svsky/1937031,如需转载请自行联系原作者