SeleniumHQ / SeleniumHQ/selenium
[🚀 Feature]: [py] Allow ClientConfig when instantiating local webdrivers
- Dominant language
- Java
- Stars
- 34.5k
- Forks
- 8.7k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 92
Description
### 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_
Contributor guide
Assessment
This issue has not been assessed yet.