Docs/Steps

Click

click performs a single left click on an element. It waits for the element to be visible and interactable before firing the event.

Shorthand

Pass a string when all you need is the element description:

yaml
- click: the sign in button

Full form

yaml
- click:
    element: the "Delete" button in the row for "invoice-2024-03"
    button: left
    modifiers: [shift]
    count: 1

Fields

FieldTypeDescription
elementrequiredstringDescription or explicit locator for the target.
button"left" | "right" | "middle"Which mouse button to press. Defaults to "left".
modifiers("shift"|"alt"|"ctrl"|"meta")[]Keys held while clicking.
countnumberClick count. 2 for a double click. Defaults to 1.
forcebooleanSkip the interactability checks. Use sparingly.
If the click is supposed to navigate, add a wait-for-url step after it so the next step does not race the page transition.