selenium icon indicating copy to clipboard operation
selenium copied to clipboard

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

Open cgoldberg opened this issue 4 months ago • 2 comments

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

cgoldberg avatar Sep 02 '25 01:09 cgoldberg

@cgoldberg, thank you for creating this issue. We will troubleshoot it as soon as we can.

Selenium Triage Team: remember to follow the Triage Guide

selenium-ci avatar Sep 02 '25 01:09 selenium-ci

I'm currently looking at implementations in other packages and doing some discovery work on this issue. I can't promise I'll do it, but I'll try.

iampopovich avatar Nov 05 '25 17:11 iampopovich