Docs
API 1.39
Status
Actions

click

The `click` step.

Clicks an element once it is visible, enabled and not covered; an obstacle in the way is handled by the obstacle layer first.

Type: target

#Keys

KeyTypeDescription
click.button"left" | "right" | "middle"The mouse button: left (the default), right or middle.
click.countintegerThe number of clicks, from 1 to 3, so 2 is a double click. Defaults to 1.
click.modifiers"Alt" | "Control" | "Meta" | "Shift"[]Keys held down during the click: any of Alt, Control, Meta and Shift.

Every step also takes the common step keys: expect, id, if, name, on_error, optional, retry, side_effect, timeout_ms, x_kaab.

#Example

{
  "id": "submit",
  "click": {
    "role": "button",
    "name": "Sign in"
  },
  "side_effect": true,
  "expect": {
    "any": [
      {
        "visible": "#otp"
      },
      {
        "landmark": "logged_in"
      }
    ]
  }
}

From the contract fixture login-2fa-checkpoint-report, a program the test suite validates.

Was this page helpful?