splinter icon indicating copy to clipboard operation
splinter copied to clipboard

Remote driver throws unexpected keyword argument 'browserName'

Open manishaery opened this issue 6 years ago • 3 comments

While creating a remote browser driver object, with Splinter 0.13.0, Selenium 3.141.0 on Python 3.8.2 I get the following error

TypeError: init() got an unexpected keyword argument 'browserName' pyenv/versions/3.8.2/lib/python3.8/site-packages/splinter/driver/webdriver/remote.py:47: TypeError

        if remote:
            return Browser(
                driver_name='remote',
                browser=browser,
                command_executor=<'selenium_node_url'>,
                **capabilities
            )

manishaery avatar Apr 09 '20 16:04 manishaery

I'm observing the exact same issue. Please help with a workaround for this Splinter team.

rohan-clumio avatar Apr 09 '20 16:04 rohan-clumio

browserName is not a valid argument for the Remote webdriver.

You're unpacking the capabilities dict you created and sending it as arguments.

If your goal is to add capabilities to WebDriver, don't unpack the dict

javascript-error avatar Apr 09 '20 16:04 javascript-error

Per the documentation: https://splinter.readthedocs.io/en/latest/drivers/remote.html

Fix was to update this:

    splinter.Browser(
        driver_name='remote',
        browser=browser,
        url=selenium_node_url,
        **capabilities
    )

To this:

    splinter.Browser(
        driver_name='remote',
        browser=browser,
        command_executor=selenium_node_url,
        desired_capabilities=capabilities
    )

There has been backward incompatible changes since 0.11.0 and upgrading to 0.13.0 has caused us some trouble. Having these compatibility issues listed explicitly in the release notes would help the users of Splinter.

sodul avatar Apr 11 '20 03:04 sodul