搜了很多解决方案还是解决不了~~~

coding=utf-8

from selenium import webdriver

driver = webdriver.Firefox()
driver.get("http://www.baidu.com")

driver.find_element_by_id("kw").send_keys("Selenium2")
driver.find_element_by_id("su").click()
driver.quit()

报错信息:
Traceback (most recent call last):
File "baidu.py", line 4, in
driver = webdriver.Firefox()
File "D:\下载各种软件\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in init
keep_alive=True)
File "D:\下载各种软件\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 156, in init
self.start_session(capabilities, browser_profile)
File "D:\下载各种软件\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 251, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "D:\下载各种软件\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "D:\下载各种软件\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities


↙↙↙阅读原文可查看相关链接,并与作者交流