Wait

Type: wait

Request that the browser waits a given amount of time or for a particular item to appear on the page.

Parameters

Name
Type
Required
Description

time

integer

The time in milliseconds that the browser should wait

selector

string

timeout

integer

The maximum amount of time the browser should wait for the provided selector to appear. Default: 10,000 (10s)

See universal parameters.

Usage

Wait for a particular amount of time

The following code will wait 1 second and then continue with the next action, if provided.

"actions": [
      {
        "name": "wait",
        "time": 1000,
      }
]

Wait for a particular element to appear

The following code will wait for a table to appear on the page for a maximum of 5 seconds. If the table has not appeared after 5 seconds the next action will be executed, if provided.

"actions": [
      {
        "name": "wait",
        "selector": "table",
        "timeout": 5000,
        "continueOnFail": true
      }
]

Last updated