Webdriver:Unsupported Marionette protocol version 2, required 3

升级到firefox到47以上版本即可

坑人的Mozilla不能起个我们熟识的名字吗? 先是webdriver.gecko.driver后是Marionette protocol。

 
1、WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
下载firefox驱动geckodriver可以放到python安装目录C:\Python27,http://docs.seleniumhq.org/download/
 
2、WebDriverException: Message: Unsupported Marionette protocol version 2, required 3
To resolve this issue you need to upgrade your Mozilla Firefox >= v47 as well.
 

from selenium import webdriver
import time

browser = webdriver.Firefox()
browser.get("http://www.baidu.com")
browser.find_element_by_id("kw").send_keys("selenium")
browser.find_element_by_id("su").click()
time.sleep(5)
browser.quit()

 

Marionette Protocol - Mozilla | MDN
https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/Protocol

The Marionette remote control protocol lets out-of-process programs to communicate with Gecko.

 

参考:

java - "org.openqa.selenium.WebDriverException: Unsupported Marionette protocol version 2" error coming while running my Selenium Script with Gecko Driver - Stack Overflow
http://stackoverflow.com/questions/39729930/org-openqa-selenium-webdriverexception-unsupported-marionette-protocol-version

selenuim +python环境配置遇到的诸多问题 - 荒荒9468 - 博客园
http://www.cnblogs.com/fangfangs/p/f0000000f.html

posted @ 2016-12-31 12:53  船长博客  阅读(1333)  评论(0编辑  收藏  举报
永远相信美好的事情即将发生!