Click

Type: click

Request that the browser clicks a particular element on the page.

Parameters

Name
Type
Required
Description

selector

string

timeout

integer

The maximum amount of time the browser should wait for the element defined by the selector to appear. Default: 20,000 (20s)

See universal parameters.

Usage

Click an element on the page

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

"actions": [
    {
      "type": "click",
      "selector": "a.header__logo"
    }
]

Wait for a particular element to appear

The following code will wait for the logo to appear for a maximum of 5 seconds and it will continue with the list of actions

"actions": [
      {
        "type": "wait",
        "selector": "a.header__logo",
          "timeout": 5000,
          "continueOnFail": true
      }
]

Last updated