无法找到一组匹配的功能

时间:2017-05-24 19:04:09

标签: python selenium iceweasel

您好我在我的Raspberry Pi上,并使用Python 3和Selenium 3.4.2,并且遇到了使Selenium与Iceweasel一起工作的问题。

来自这段代码

webdriver.Firefox(executable_path="/home/pi/Desktop/geckodriver")

我得到了这个

Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
webdriver.Firefox(executable_path="/home/pi/Desktop/geckodriver")
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/firefox/webdriver.py", line 152, in __init__
keep_alive=True)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/webdriver.py", line 188, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: 
Message: Unable to find a matching set of capabilities

版本:

  • Selenium 3.4.2
  • Python 3
  • Iceweasel 45.9.0esr-1~deb8u1

1 个答案:

答案 0 :(得分:1)

如果硒不支持Iceweasel,它看起来像(截至2周前)版本45。 (https://github.com/mozilla/geckodriver/issues/728)。

根据该主题(https://github.com/SeleniumHQ/selenium/issues/3884)中的链接问题,似乎3.4.2版本的selenium支持更新版本的Firefox。