Skip to content

[🐛 Bug]: Timeout env variable GLOBAL_DEFAULT_TIMEOUT has no effect #15604

Open
@justinjosephmkj

Description

@justinjosephmkj

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pyPython BindingsI-defectSomething is not working as intendedI-regressionSomething was working but we "fixed" itR-help wantedIssues looking for contributions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions