Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

Selenium Wire Remote instantiates with incorrect arguments #717

Open
@anthonybtedesco

Description

@anthonybtedesco

When instantiating a selenium-wire remote webdriver, it passes to the original selenium remote webdriver a desired_capabilities arguments which is not accepted. If changed to options in the init method

`class Remote(InspectRequestsMixin, DriverCommonMixin, _Remote):
"""Extend the Remote webdriver to provide additional methods for inspecting requests."""

def __init__(self, *args, seleniumwire_options=None, **kwargs):
    """Initialise a new Firefox WebDriver instance.

    Args:
        seleniumwire_options: The seleniumwire options dictionary.
    """
    if seleniumwire_options is None:
        seleniumwire_options = {}

    config = self._setup_backend(seleniumwire_options)

    if seleniumwire_options.get('auto_config', True):
        capabilities = kwargs.get('desired_capabilities')
        if capabilities is None:
            capabilities = DesiredCapabilities.FIREFOX.copy()
        else:
            capabilities = capabilities.copy()

        capabilities.update(config)

        kwargs['desired_capabilities'] = capabilities
        pdb.set_trace()

    super().__init__(*args, **kwargs)`

"desired_capabilities" is not a valid argument to pass, I tried changing it to "options" which is a valid argument, but then chrome crashes. Any help would be amazing on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions