在Docker环境中找不到匹配的功能集python硒

问题描述

我在docker环境中遇到错误List<Service>

这是我的配置:

selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

我要测试的示例代码

Python 3.9.0
selenium==3.141.0
webdriver-manager==3.2.2
pymongo==3.11.0
Mozilla Firefox 78.4.0esr
geckodriver 0.27.0
location for geckodriver:'usr/loca/bin'

解决方法

我花了一个小时,通过将geckodriver降级为0.26.0解决了这个问题 最新版本可能存在问题,我对我的设置和/或确认这一点的能力不够自信。