2016-06-15 31 views
-1

我使用的是建立在硒蟒蛇分裂,我想使用另一種的webdriver用於Firefox從47版本開始火狐改變的webdriver按以下鏈接如何在分裂中使用Firefox的硒功能?

https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver

碎片文件說,你可以通過功能參數使用硒的能力

from splinter import Browser 
browser = Browser(‘firefox’, capabilities={‘acceptSslCerts’: True}) 

http://splinter.readthedocs.io/en/master/drivers/firefox.html#how-to-use-selenium-capabilities-for-firefox

但使用測試時,我得到了錯誤

TypeError: init() got an unexpected keyword argument 'capabilities'

也類splinter.driver.webdriver.firefox.WebDriver不包含支持購買,但在分裂的文檔包含它,我有最新版本的我失去了什麼?

__init__(self, profile=None, extensions=None, user_agent=None, profile_preferences=None, fullscreen=False, wait_time=2) 

回答

0

您正在尋找的splinter項目master分支生成的文檔。

對於capabilities工作,你需要卸載splinter並安裝directly from github

$ pip uninstall splinter 
$ pip install git+https://github.com/cobrateam/splinter#master 

(爲我工作)。

+0

這解決了這個問題,謝謝,請您詳細解釋什麼是主版本? – Amr

+0

@Amr在這種情況下,這是一個「代表」包的開發版本的git分支。 – alecxe