Skip to content

[🚀 Feature]: [py] Allow ClientConfig when instantiating local webdrivers #16282

@cgoldberg

Description

@cgoldberg

Description

related to #16269

There is a ClientConfig class (in py/selenium/webdriver/remote/client_config.py) that is responsible for configuring client-specific options that are not applicable to the remote, such as HTTP and WebSocket connection timeouts. We allow this to be passed to the __init__ for Remote WebDrivers, but not any of the local driver subclasses.

Currently, the only way to access ClientConfig is through the driver.command_executor.client_config attribute after the driver is created. It would be better if we had a client_config keyword arg on all the driver __init__ methods so you can pass a ClientConfig instance when creating them.

This would allow me to do:

from selenium import webdriver
from selenium.webdriver.remote.client_config import ClientConfig

client_config = ClientConfig(websocket_timeout=10)
driver = webdriver.Chrome(client_config=client_config)

Have you considered any alternatives or workarounds?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-pyPython BindingsI-enhancementSomething could be better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions