Skip to content

[🐛 Bug] [Python] setting remote_server_addr in RemoteConnection() is deprecated #14686

@pquentin

Description

@pquentin

What happened?

#13286 added a new warning that was released in 4.26.0. Unfortunately there is still code in Selenium that triggers this warning. This happens with at least with the Firefox and Chromium webdrivers. This broke our CI as we fail on unknown warnings.

How can we reproduce the issue?

My use case is urllib3 using pytest-pyodide, but this can be reproduced with the "Getting Started" sample:

from selenium import webdriver

driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
driver.close()

Then run with warning enableds using python -Wall sample.py.

Relevant log output

/.../urllib3/.nox/emscripten-firefox/lib/python3.12/site-packages/selenium/webdriver/firefox/remote_connection.py:35: DeprecationWarning: setting remote_server_addr in RemoteConnection() is deprecated, set in ClientConfig instance instead
  super().__init__(

Operating System

Ubuntu

Selenium version

Python 4.26.0

What are the browser(s) and version(s) where you see this issue?

Chrome, Firefox

What are the browser driver(s) and version(s) where you see this issue?

Not sure.

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pyPython BindingsI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions