Get Timeouts

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The Get Timeouts command of the WebDriver API returns the timeouts associated with the current session. The session timeout durations control such behavior as timeouts on script injection, document navigation, and element retrieval.

Syntax

Method URI template
GET /session/{session id}/timeouts

URL parameters

session id

Identifier of the session.

Response

The response payload is a Timeouts object:

implicit

Time in milliseconds to retry the element location strategy when finding an element. This defaults to 0, meaning the strategy is run only once.

pageLoad

Time in milliseconds to wait for the document to finish loading. By default WebDriver will wait five minutes (or 300,000 ms).

script

Scripts injected with Execute Script or Execute Async Script will run until they hit the script timeout duration, which is also given in milliseconds. The scripts will then be interrupted and a script timeout error will be returned. Defaults to 30 seconds (or 30,000 ms).

Errors

Invalid session ID

Session does not exist.

Specifications

Specification
WebDriver
# get-timeouts

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
GetTimeouts
Chrome – Full support
Chrome 65 (Release date: 2018-03-06)
footnote
footnote To enable Chromium support, include {"goog:chromeOptions": {"w3c": true}} in the capabilities.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote To enable Chromium support, include {"goog:chromeOptions": {"w3c": true}} in the capabilities.
Firefox – Full support
Firefox 55 (Release date: 2017-08-08)
footnote Full support
Opera – No support
Opera
footnote
footnote To enable Chromium support, include {"goog:chromeOptions": {"w3c": true}} in the capabilities.
Safari – No support
Safari
footnote
footnote The vendor-supported implementation for Safari is non spec-conforming and incompatible.
Chrome Android – No support
Chrome Android
footnote
footnote To enable Chromium support, include {"goog:chromeOptions": {"w3c": true}} in the capabilities.
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – No support
Opera Android
footnote
footnote To enable Chromium support, include {"goog:chromeOptions": {"w3c": true}} in the capabilities.
Safari on iOS – No support
Safari on iOS
footnote
footnote The vendor-supported implementation for Safari on iOS is non spec-conforming and incompatible.
Samsung Internet – No support
Samsung Internet
footnote
footnote The vendor-supported implementation for Samsung Internet is non-spec-conforming and incompatible.
WebView Android – No support
WebView Android
footnote
footnote To enable Chromium support, include {"goog:chromeOptions": {"w3c": true}} in the capabilities.
WebView on iOS – No support
WebView on iOS
footnote
footnote The vendor-supported implementation for WebView on iOS is non spec-conforming and incompatible.

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

See also