You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm following the getting started, and getting on windows and on linux(ubuntu) the exception: selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: unrecognized capability: name
Full Stack Trace on Linux
tests/test_example.py:3 (test_google)
py=<pylenium.driver.Pyleniumobjectat0x7fb7cf738110>deftest_google(py: Pylenium):
>py.visit('https://lambdatest.github.io/sample-todo-app/')
tests/test_example.py:5:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/pylenium/driver.py:359: invisitself.webdriver.get(url)
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/pylenium/driver.py:232: inwebdriverreturnself.init_webdriver() ifself._webdriverisNoneelseself._webdriver
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/pylenium/driver.py:200: ininit_webdriverself._webdriver=webdriver_factory.build_from_config(self.config)
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/pylenium/webdriver_factory.py:149: inbuild_from_configreturnbuild_firefox(seleniumwire_options=config.driver.seleniumwire_options, **_config)
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/pylenium/webdriver_factory.py:267: inbuild_firefoxreturnwire_driver.Firefox(
__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self=<[AttributeError("'Firefox' object has no attribute 'session_id'") raisedinrepr()] Firefoxobjectat0x7fb7cfeb92d0>seleniumwire_options= {}, args= ()
kwargs= {'capabilities': {'acceptInsecureCerts': True, 'browserName': 'firefox', 'moz:debuggerAddress': True, 'name': 'test_go...ns.Options object at 0x7fb7cf73d750>, 'service': <selenium.webdriver.firefox.service.Serviceobjectat0x7fb7d308cc50>}
firefox_options=<selenium.webdriver.firefox.options.Optionsobjectat0x7fb7cf73d750>config= {'acceptInsecureCerts': True, 'proxy': {'httpProxy': '127.0.0.1:40055', 'proxyType': 'manual', 'sslProxy': '127.0.0.1:40055'}}
proxy=<selenium.webdriver.common.proxy.Proxyobjectat0x7fb7cf75c550>def__init__(self, *args, seleniumwire_options=None, **kwargs):
"""Initialise a new Firefox WebDriver instance. Args: seleniumwire_options: The seleniumwire options dictionary. """ifseleniumwire_optionsisNone:
seleniumwire_options= {}
try:
firefox_options=kwargs['options']
exceptKeyError:
firefox_options=FirefoxOptions()
kwargs['options'] =firefox_options# Prevent Firefox from bypassing the Selenium Wire proxy# for localhost addresses.firefox_options.set_preference('network.proxy.allow_hijacking_localhost', True)
firefox_options.accept_insecure_certs=Trueconfig=self._setup_backend(seleniumwire_options)
ifseleniumwire_options.get('auto_config', True):
ifSELENIUM_V4:
# From Selenium v4.0.0 the browser's proxy settings can no longer# be passed using desired capabilities and we must use the options# object instead.proxy=Proxy()
proxy.http_proxy=config['proxy']['httpProxy']
proxy.ssl_proxy=config['proxy']['sslProxy']
try:
proxy.no_proxy=config['proxy']['noProxy']
exceptKeyError:
passfirefox_options.proxy=proxyelse:
# Earlier versions of Selenium use capabilities to pass the settings.capabilities=kwargs.get('capabilities', kwargs.get('desired_capabilities'))
ifcapabilitiesisNone:
capabilities=DesiredCapabilities.FIREFOXcapabilities=capabilities.copy()
capabilities.update(config)
kwargs['capabilities'] =capabilities>super().__init__(*args, **kwargs)
ETypeError: WebDriver.__init__() gotanunexpectedkeywordargument'capabilities'
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/seleniumwire/webdriver.py:179: TypeError
With Firefox i get on both: TypeError: WebDriver.__init__() got an unexpected keyword argument 'capabilities'
Full stack trace on Linux
tests/test_example.py:3 (test_google)
py=<pylenium.driver.Pyleniumobjectat0x7fb7cf738110>deftest_google(py: Pylenium):
>py.visit('https://lambdatest.github.io/sample-todo-app/')
tests/test_example.py:5:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/pylenium/driver.py:359: invisitself.webdriver.get(url)
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/pylenium/driver.py:232: inwebdriverreturnself.init_webdriver() ifself._webdriverisNoneelseself._webdriver
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/pylenium/driver.py:200: ininit_webdriverself._webdriver=webdriver_factory.build_from_config(self.config)
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/pylenium/webdriver_factory.py:149: inbuild_from_configreturnbuild_firefox(seleniumwire_options=config.driver.seleniumwire_options, **_config)
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/pylenium/webdriver_factory.py:267: inbuild_firefoxreturnwire_driver.Firefox(
__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self=<[AttributeError("'Firefox' object has no attribute 'session_id'") raisedinrepr()] Firefoxobjectat0x7fb7cfeb92d0>seleniumwire_options= {}, args= ()
kwargs= {'capabilities': {'acceptInsecureCerts': True, 'browserName': 'firefox', 'moz:debuggerAddress': True, 'name': 'test_go...ns.Options object at 0x7fb7cf73d750>, 'service': <selenium.webdriver.firefox.service.Serviceobjectat0x7fb7d308cc50>}
firefox_options=<selenium.webdriver.firefox.options.Optionsobjectat0x7fb7cf73d750>config= {'acceptInsecureCerts': True, 'proxy': {'httpProxy': '127.0.0.1:40055', 'proxyType': 'manual', 'sslProxy': '127.0.0.1:40055'}}
proxy=<selenium.webdriver.common.proxy.Proxyobjectat0x7fb7cf75c550>def__init__(self, *args, seleniumwire_options=None, **kwargs):
"""Initialise a new Firefox WebDriver instance. Args: seleniumwire_options: The seleniumwire options dictionary. """ifseleniumwire_optionsisNone:
seleniumwire_options= {}
try:
firefox_options=kwargs['options']
exceptKeyError:
firefox_options=FirefoxOptions()
kwargs['options'] =firefox_options# Prevent Firefox from bypassing the Selenium Wire proxy# for localhost addresses.firefox_options.set_preference('network.proxy.allow_hijacking_localhost', True)
firefox_options.accept_insecure_certs=Trueconfig=self._setup_backend(seleniumwire_options)
ifseleniumwire_options.get('auto_config', True):
ifSELENIUM_V4:
# From Selenium v4.0.0 the browser's proxy settings can no longer# be passed using desired capabilities and we must use the options# object instead.proxy=Proxy()
proxy.http_proxy=config['proxy']['httpProxy']
proxy.ssl_proxy=config['proxy']['sslProxy']
try:
proxy.no_proxy=config['proxy']['noProxy']
exceptKeyError:
passfirefox_options.proxy=proxyelse:
# Earlier versions of Selenium use capabilities to pass the settings.capabilities=kwargs.get('capabilities', kwargs.get('desired_capabilities'))
ifcapabilitiesisNone:
capabilities=DesiredCapabilities.FIREFOXcapabilities=capabilities.copy()
capabilities.update(config)
kwargs['capabilities'] =capabilities>super().__init__(*args, **kwargs)
ETypeError: WebDriver.__init__() gotanunexpectedkeywordargument'capabilities'
../../.cache/pypoetry/virtualenvs/pyleniumtest-cIp5K4se-py3.11/lib/python3.11/site-packages/seleniumwire/webdriver.py:179: TypeError
I followed the guide and changed nothing else. I only changed the version to latest, because I got a version error.
The text was updated successfully, but these errors were encountered:
@beu-adesso I think I found the problem! As expected, you did nothing wrong, but there is a simple workaround to keep yo going until I get this fixed and a new version pushed up.
As you already did, make sure to add "latest" to the driver.version in pylenium.json
Next, open the auto-generated conftest.py and remove or comment out this line from it (Line 257):
Hi,
I'm following the getting started, and getting on windows and on linux(ubuntu) the exception:
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: unrecognized capability: name
Full Stack Trace on Linux
With Firefox i get on both:
TypeError: WebDriver.__init__() got an unexpected keyword argument 'capabilities'
Full stack trace on Linux
I followed the guide and changed nothing else. I only changed the version to latest, because I got a version error.
The text was updated successfully, but these errors were encountered: