python+selenium+火狐浏览器
1.测试是否正常
from selenium import webdriver
driver = webdriver.Firefox()
driver.get("http://www.baidu.com")
2.报错一:selenium.common.exceptions.WebDriverException: Message: Unsupported Marionette protocol version 2, required 3
升级火狐浏览器
3.报错二:selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
下载geckodriver,将其放在火狐浏览器的安装目录下,并配置环境变量,如果不行需重启pycharm或者电脑
谷歌浏览器89.0.2
geckodriver-v0.24.0 亲测可用
geckodriver百度网盘:
链接:https://pan.baidu.com/s/1zEvkK85185UnKE2MzYs4-A
提取码:30i8
3.报错三:selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities
geckodriver和selenium版本不兼容
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)