Remote driver throws unexpected keyword argument 'browserName'
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
)
I'm observing the exact same issue. Please help with a workaround for this Splinter team.
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
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.