pytest-dev / pytest-selenium

Plugin for running Selenium with pytest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

desired capabilities causes error

BeyondEvil opened this issue · comments

          Hello, since yesterday (release 4.10.0 of Selenium, https://github.com/SeleniumHQ/selenium/releases/tag/selenium-4.10.0), this warning is no more a warning but is causing the code to fail:
Traceback (most recent call last):
  File "/opt/venv/lib/python3.9/site-packages/pytest_selenium/pytest_selenium.py", line 200, in driver
    for retry in Retrying(
  File "/opt/venv/lib/python3.9/site-packages/tenacity/__init__.py", line 347, in __iter__
    do = self.iter(retry_state=retry_state)
  File "/opt/venv/lib/python3.9/site-packages/tenacity/__init__.py", line 325, in iter
    raise retry_exc.reraise()
  File "/opt/venv/lib/python3.9/site-packages/tenacity/__init__.py", line 158, in reraise
    raise self.last_attempt.result()
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 433, in result
    return self.__get_result()
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/opt/venv/lib/python3.9/site-packages/pytest_selenium/pytest_selenium.py", line 207, in driver
    driver = driver_class(**driver_kwargs)
TypeError: __init__() got an unexpected keyword argument 'desired_capabilities'

Versions:
OS: Debian 11
Python: 3.9.2
pytest: 7.3.1
pytest-selenium: 4.0.1

Regards

Originally posted by @sdiemer in #283 (comment)

commented

Just chiming in, I stumbled upon the same problem.

OS: Ubuntu 22.04 LTS
Python: 3.10.6
pytest: 7.0.1
pytest-selenium: 4.0.1

Hello , we are facing the same issue.

Is there any update / fix for this?

Currently the only workaround is pinning selenium to a version where it works.

Downgrading to selenium==4.9.0 worked for me.

CVE PYSEC-2023-101 now requires selenium>=4.10 but pytest-selenium has breaking errors with it. :-(

CVE PYSEC-2023-101 now requires selenium>=4.10 but pytest-selenium has breaking errors with it. :-(

Thanks, I'll try to prioritise this. Not sure exactly how much work is involved at this time tho.

Isn't this a duplicate of #283?

Any update on this ?

Any update on this ?

Yeah, as soon as I'm done releasing v4 of pytest-html, this is my next thing.

CVE PYSEC-2023-206 now requires selenium>=4.14.0.