嗨,我在我的 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