Set a Selenium Page-Load Timeout Behind a Proxy
Set a browser navigation timeout and distinguish it from element waits, script timeouts and the WebDriver control connection.
from selenium.common.exceptions import TimeoutException
driver.set_page_load_timeout(30)
try:
driver.get('https://example.com/')
except TimeoutException:
print('The navigation did not finish within its page-load timeout.')
Set this before navigation on the driver already configured with the intended proxy. Python's method takes seconds.
The selected page-load strategy defines completion: normal waits for complete document readiness, while eager uses an earlier state. Neither waits for every future script-created request.
| Limit | Work bounded |
|---|---|
| Page-load timeout | Navigation reaching its selected completion state |
| Implicit wait | Element-location attempts |
| Script timeout | Applicable asynchronous script execution |
| Runner's WebDriver transport timeout | The separate control request from test script to driver |
If that control connection hangs or takes an unsuitable proxy, a browser navigation budget does not fix it. Multi-step workflows also need an overall job budget; a supervising runner can detect stalled progress separately from a single navigation.
Keep the reported timer or transport in the failure record. A navigation timeout alone does not distinguish proxy setup, destination delay and the page's own loading behavior.