Skip to content

Interface: ITimeoutCommands

@appium/types.ITimeoutCommands

Hierarchy

  • ITimeoutCommands

Driver

Table of contents

Methods

Methods

getTimeouts

getTimeouts(): Promise<Record<string, number>>

Get the current timeouts

See

https://w3c.github.io/webdriver/#get-timeouts

Returns

Promise<Record<string, number>>

A map of timeout names to ms values

Defined in

node_modules/@appium/types/lib/driver.ts:77


implicitWait

implicitWait(ms): Promise<void>

Set the implicit wait timeout

Deprecated

Use timeouts instead

Parameters

Name Type Description
ms string | number the timeout in ms

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:53


implicitWaitForCondition

implicitWaitForCondition(condition): Promise<unknown>

Periodically retry an async function up until the currently set implicit wait timeout

Parameters

Name Type Description
condition (...args: any[]) => Promise<any> the behaviour to retry until it returns truthy

Returns

Promise<unknown>

The return value of the condition

Defined in

node_modules/@appium/types/lib/driver.ts:69


implicitWaitMJSONWP

implicitWaitMJSONWP(ms): Promise<void>

Set the implicit wait value that was sent in via the JSONWP

Deprecated

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:92


implicitWaitW3C

implicitWaitW3C(ms): Promise<void>

Set the implicit wait value that was sent in via the W3C protocol

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:84


newCommandTimeout

newCommandTimeout(ms): Promise<void>

Set Appium's new command timeout

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:129


pageLoadTimeoutMJSONWP

pageLoadTimeoutMJSONWP(ms): Promise<void>

Set the page load timeout value that was sent in via the JSONWP

Deprecated

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:107


pageLoadTimeoutW3C

pageLoadTimeoutW3C(ms): Promise<void>

Set the page load timeout value that was sent in via the W3C protocol

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:99


parseTimeoutArgument

parseTimeoutArgument(ms): number

Get a timeout value from a number or a string

Parameters

Name Type Description
ms string | number the timeout value as a number or a string

Returns

number

The timeout as a number in ms

Defined in

node_modules/@appium/types/lib/driver.ts:138


scriptTimeoutMJSONWP

scriptTimeoutMJSONWP(ms): Promise<void>

Set the script timeout value that was sent in via the JSONWP

Deprecated

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:122


scriptTimeoutW3C

scriptTimeoutW3C(ms): Promise<void>

Set the script timeout value that was sent in via the W3C protocol

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:114


setImplicitWait

setImplicitWait(ms): void

A helper method (not a command) used to set the implicit wait value

Parameters

Name Type Description
ms number the implicit wait in ms

Returns

void

Defined in

node_modules/@appium/types/lib/driver.ts:60


setNewCommandTimeout

setNewCommandTimeout(ms): void

Set the new command timeout

Parameters

Name Type Description
ms number the timeout in ms

Returns

void

Defined in

node_modules/@appium/types/lib/driver.ts:43


timeouts

timeouts(type, ms, script?, pageLoad?, implicit?): Promise<void>

Set the various timeouts associated with a session

See

https://w3c.github.io/webdriver/#set-timeouts

Parameters

Name Type Description
type string used only for the old (JSONWP) command, the type of the timeout
ms string | number used only for the old (JSONWP) command, the ms for the timeout
script? number the number in ms for the script timeout, used for the W3C command
pageLoad? number the number in ms for the pageLoad timeout, used for the W3C command
implicit? string | number the number in ms for the implicit wait timeout, used for the W3C command

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:30