How-to
Click (click)
Click (click)
A single click on an element. Target is required: an object-repository element or an on-step locator.
Step model
action_name | click |
| Group | Pointer |
| Target | Required |
| Value | Unused |
| expected_value | Unused |
| TEST_ACCOUNT | Forbidden |
| Do not confuse with | dblclick, hover |
Target/Value facts match the source-of-truth catalog and Autotest step.
Prerequisites
- The element must be visible when the step runs (add
toBeVisibleorwaitForSelectorearlier if needed). - The link must not open a new tab (
target=_blank).
Steps
- Add a step and choose
click. - Set Target: an object-repository element or a locator (
kind+ value). - Leave Value empty.
- Save and optionally check syntax.
The step is stored on the autotest. Next - neighbouring steps or autotest run creation.
Examples
Button by role
Fields in the UI:
| Field | Value |
|---|---|
action_name | click |
| Target | kind ROLE, value button, name Сохранить |
Step JSON fragment (copy-paste):
json
{
"action_name": "click",
"target": {
"kind": "ROLE",
"value": "button",
"name": "Сохранить"
}
}Link by text
Fields in the UI:
| Field | Value |
|---|---|
action_name | click |
| Target | kind TEXT, value Забыли пароль? |
Step JSON fragment (copy-paste):
json
{
"action_name": "click",
"target": {
"kind": "TEXT",
"value": "Забыли пароль?"
}
}Common mistakes
- Clicking a
target=_blanklink breaks the flow - usegotowith a full URL. - A CSS locator with
*=triggers a syntax warning and a brittle step.
Screenshots
Screenshots of the step form for click will be added here in a later pass.
Did this page help?