pytest-splinter icon indicating copy to clipboard operation
pytest-splinter copied to clipboard

init() got an unexpected keyword 'desired_capabilites'

Open viktor2097 opened this issue 2 years ago • 1 comments

def __init__(
    self,
    browser="firefox",
    wait_time=2,
    command_executor=DEFAULT_URL,
    **kwargs
):
    browser_name = browser.upper()
    # Handle case where user specifies IE with a space in it
    if browser_name == "INTERNET EXPLORER":
        browser_name = "INTERNETEXPLORER"

    # If no desired capabilities specified, add default ones
    caps = getattr(DesiredCapabilities, browser_name, {})
    if kwargs.get('desired_capabilities'):
        # Combine user's desired capabilities with default
        caps.update(kwargs['desired_capabilities'])

    kwargs['desired_capabilities'] = caps

E TypeError: init() got an unexpected keyword argument 'desired_capabilities'

Fresh installations break due to changes in Selenium 4.10+, since there is no dependency range for selenium, it will install the latest version.

Setting selenium==4.9.1 in requirements.txt works for now

viktor2097 avatar Aug 29 '23 14:08 viktor2097

There is an upgrade guide from the selenium devs here: https://www.selenium.dev/documentation/webdriver/troubleshooting/upgrade_to_selenium_4/

oaken-source avatar May 10 '24 07:05 oaken-source