Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when using the latest Selenium #1173

Closed
mpibpc-mroose opened this issue Jun 8, 2023 · 3 comments
Closed

Exception when using the latest Selenium #1173

mpibpc-mroose opened this issue Jun 8, 2023 · 3 comments

Comments

@mpibpc-mroose
Copy link
Contributor

Hi,
for my tests I always use the last Selenium docker image:

version: '3.7'

services:
  django:
    build:
      context: .
    depends_on:
      - selenium

  selenium:
    image: selenium/standalone-chrome:latest
    shm_size: '4G'

With the last Selenium I get the following exception:

Traceback (most recent call last):
  File "/source/lib/unittest.py", line 49, in setUpClass
    cls.browser = Browser(
                  ^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/splinter/browser.py", line 125, in Browser
    return get_driver(driver, retry_count=retry_count, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/splinter/browser.py", line 93, in get_driver
    return driver(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/splinter/driver/webdriver/remote.py", line 44, in __init__
    driver = Remote(command_executor, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: WebDriver.__init__() got an unexpected keyword argument 'desired_capabilities'
  • Digest: sha256:da6d0894a465c938a8134f44c1bfcc4e0adaca45296dc65d3fed87e1b6b8ee2fwas fine
  • Digest: sha256:9fd0fe4f8a39f65aeecbdb38fc35eda6e505f217d9c0f0d3420b17cd187e9216 fails
@mpibpc-mroose
Copy link
Contributor Author

The problem seems to be the latest selenium PyPi package (4.10). When downgrading to 4.9.1 all is fine.

@brondsem
Copy link
Contributor

I found this post which seems to explain pretty well what needs to change to work with selenium 4.10: https://stackoverflow.com/questions/76430192/getting-typeerror-webdriver-init-got-an-unexpected-keyword-argument-desi

@jsfehler
Copy link
Collaborator

Fixed by #1202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants