Skip to content

init() got an unexpected keyword 'desired_capabilites' #176

Open
@viktor2097

Description

@viktor2097
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions