selenium: [🐛 Bug]: Timeout env variable GLOBAL_DEFAULT_TIMEOUT has no effect
Description
The timeout is always set to 120 seconds, the env variable has GLOBAL_DEFAULT_TIMEOUT has no effect.
https://github.com/SeleniumHQ/selenium/blob/ecb0dbf91415b10d718acf28afefc16654a9f13a/py/selenium/webdriver/chromium/remote_connection.py#L33
client_config = client_config or ClientConfig( remote_server_addr=remote_server_addr, keep_alive=keep_alive, timeout=120 )
https://github.com/SeleniumHQ/selenium/blob/ecb0dbf91415b10d718acf28afefc16654a9f13a/py/selenium/webdriver/remote/client_config.py#L107
self.timeout = ( ( float(os.getenv("GLOBAL_DEFAULT_TIMEOUT", str(socket.getdefaulttimeout()))) if os.getenv("GLOBAL_DEFAULT_TIMEOUT") is not None else socket.getdefaulttimeout() ) if timeout is None else timeout )
Others: https://github.com/SeleniumHQ/selenium/blob/ecb0dbf91415b10d718acf28afefc16654a9f13a/py/selenium/webdriver/firefox/remote_connection.py#L35 https://github.com/SeleniumHQ/selenium/blob/ecb0dbf91415b10d718acf28afefc16654a9f13a/py/selenium/webdriver/safari/remote_connection.py#L35
Reproducible Code
driver.get("https://github.com/")
driver.implicitly_wait(130)
field = driver.find_element(By.ID, "qwertyzxcvb")
Debugging Logs
/site-packages/urllib3/connectionpool.py", line 369, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=123): Read timed out. (read timeout=120)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (16 by maintainers)
@Pikamander2
I just opened #15672 that is related to your issue.
You should be able to do this:
If #15672 gets implemented, you could then do:
I’d prefer to remove it so we don’t have to remember to remove the warning eventually. Since it doesn’t currently work, nobody would be any worse off than they are today.