0

嗨,我在我的 Raspberry Pi 上,并使用带有 Selenium 3.4.2 的 Python 3,并且在使 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

版本:

  • 硒 3.4.2
  • 蟒蛇 3
  • Iceweasel 45.9.0esr-1~deb8u1
4

1 回答 1

1

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

从该线程中的链接问题(https://github.com/SeleniumHQ/selenium/issues/3884)来看,3.4.0 版本的 selenium 似乎支持更新版本的 Firefox。

于 2017-05-24T19:20:51.643 回答