# Timeouts

## session.getTimeouts()

Gets timeout durations associated with the current session.

**RETURNS**

Promise<[Timeouts](#timeouts)>

**EXAMPLES**

```typescript
const timeout = await session.getTimeouts();
// timeout = {
//   script: 30000,
//   pageLoad: 60000,
//   implicit: 40000
// }
```

**SEE ALSO**

* [WebDriver spec](https://www.w3.org/TR/webdriver/#get-timeouts)

## session.setTimeouts(timeout)

Configure the amount of time that a particular type of operation can execute for before they are aborted and a Timeout error is returned to the client.

**PARAMETERS**

* `timeout`: [Timeouts](#timeouts) - Session timeout configuration object

**RETURNS**

Promise\<void>

**EXAMPLES**

```typescript
await session.setTimeouts({
  script: 30000,
  pageLoad: 60000,
  implicit: 40000
});
```

**SEE ALSO**

* [WebDriver spec](https://www.w3.org/TR/webdriver/#set-timeouts)

## Timeouts

WebDriver Timeout configuration object

**PROPERTIES**

* `script?`: number - Session script timeout in milliseconds. Determines when to interrupt a script that is being evaluated.
* `pageLoad?`: number - Session page load timeout in milliseconds. Provides the timeout limit used to interrupt navigation of the browsing context.
* `implicit?`: number - Session implicit wait timeout in milliseconds. Gives the timeout of when to abort locating an element.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mucsi96.gitbook.io/w3c-webdriver/timeouts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
