Search code examples
pythonseleniumwebdriversplinter

How to use selenium capabilities for Firefox in splinter?


I'm using python splinter which is built on selenium, i want to use another webdriver for firefox as starting from version 47 firefox changed the webdriver as per below link

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

splinter docs says you can pass capabilities argument to use selenium capabilities

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

but when using testing i got the error

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

also class splinter.driver.webdriver.firefox.WebDriver doesn't contain capabilites, although in splinter doc it contains it, i have the latest version what am i missing?!

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

Solution

  • You are looking at the documentation generated for the master branch of the splinter project.

    For capabilities to work, you need to uninstall splinter and install it directly from github:

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

    (worked for me).