Element reference
Autotest step
Autotest step
An autotest step is one Playwright action inside an autotest. A step has action_name, optional Target, optional Value, optional timeout_ms, and expected_value when needed.
On the autotest card, steps use the Panel or Cards view. How to switch and when only cards remain: Autotest step authoring.
The source of truth for action rules is the data file autotest-actions.json in the documentation repository (app/src/.vitepress/data/). Per-action how-tos: /en/autotests/actions/{action_name}.
Relations
| Related element | How it connects |
|---|---|
| Autotest | Required parent |
| Element / page | Optional Target from the object repository |
| Test account | Via Value source TEST_ACCOUNT on the running CASE |
Model fields
| Label | Technical name | Meaning |
|---|---|---|
| Action | action_name | Name from the catalog (21 actions) |
| Target | Target | Repository element/page or on-step locator |
| Value | Value / value_text | Text, path, URL, key, or attribute name - per action |
| Value source | value_source_type | INLINE or TEST_ACCOUNT |
| Account field | value_source_field | login or password when TEST_ACCOUNT |
| Timeout | timeout_ms | Optional wait/assert limit in ms |
| Expected value | expected_value | For toHaveAttribute: expected attribute contents |
Field tables as a schema projection arrive after the request-validation schema artifact. Until then, use the action catalog below and the SDK.
Target locator kinds
kind literals are UPPERCASE only:
kind | Meaning | UI label (EN) |
|---|---|---|
ROLE | Accessibility role; add name when needed (name) | Role |
LABEL | Associated field label (label / accessible name of an input) | Label |
PLACEHOLDER | Placeholder | Placeholder |
TESTID | Test id | Test id |
TEXT | Visible text on the page (not a field label) | Text |
CSS | CSS selector | CSS |
ID | id attribute | ID |
NAME | name attribute | Name |
XPATH | XPath | XPath |
SELECTOR | Generic selector | Selector |
In Find by, do not confuse LABEL and TEXT:
| Choose | When |
|---|---|
LABEL (Label) | Target a control by its label (for example “Email” or “Password” on an input) |
TEXT (Text) | Target an element by visible text on screen (a “Save” button, a heading, a link) |
On the autotest step card the select is Find by. The same kind literals and the same original English labels (Role, Label, Text) appear on object-repository elements, in every UI locale.
JSON and API always use LABEL / TEXT (UPPERCASE), matching the enum literals. UI labels stay the original English words; they are not translated.
Target may also reference an object-repository record instead of an on-step locator. Details: Binding a Target from the object repository.
Value sources
| Value | Meaning |
|---|---|
INLINE | Text is stored on the step |
TEST_ACCOUNT | The worker reads field login or password from the running CASE account |
Test-account fields for the source: login, password. How-to: Test account values in steps.
Catalog rules
- Screenshot is not a step. Run options (
Screenshot on failure,Result screenshot) are not anaction_name. Typical false step failures: How to author autotest steps without false failures. TEST_ACCOUNTcannot be combined with a repository page Target on the same step.TEST_ACCOUNTis forbidden forgoto,waitForURL,toHaveURL, andwaitForTimeout.- Do not click new-tab links (
target=_blank): open the URL withgoto. - Check syntax inspects stored steps. It does not open the site and does not catch Playwright strict mode at runtime.
- It warns when a CSS locator uses substring
*=. Prefer exact locators.
Action catalog
Target / Value columns: required, unused, or optional - from autotest-actions.json. The link opens the action how-to.
action_name | Group | Target | Value | TEST_ACCOUNT | How-to |
|---|---|---|---|---|---|
goto | Navigation | Unused | Optional (url) | No | goto |
click | Pointer | Required | Unused | No | click |
dblclick | Pointer | Required | Unused | No | dblclick |
fill | Input | Required | Required (text) | Yes | fill |
type | Input | Required | Required (text) | Yes | type |
press | Input | Required | Required (key) | Yes | press |
check | Input | Required | Unused | No | check |
uncheck | Input | Required | Unused | No | uncheck |
selectOption | Input | Required | Required (text) | Yes | selectOption |
hover | Pointer | Required | Unused | No | hover |
focus | Pointer | Required | Unused | No | focus |
waitForSelector | Wait | Required | Unused | No | waitForSelector |
waitForURL | Wait | Unused | Required (url) | No | waitForURL |
waitForTimeout | Wait | Unused | Required (duration_ms) | No | waitForTimeout |
goBack | Navigation | Unused | Unused | No | goBack |
goForward | Navigation | Unused | Unused | No | goForward |
reload | Navigation | Unused | Unused | No | reload |
toBeVisible | Expect | Required | Unused | No | toBeVisible |
toHaveText | Expect | Required | Required (text) | Yes | toHaveText |
toHaveURL | Expect | Unused | Required (url) | No | toHaveURL |
toHaveAttribute | Expect | Required | Required (attribute_name) + expected_value | Yes | toHaveAttribute |
Limits
- For
goto, a full URL must point to a verified team domain (or subdomain). - A failed expect step (
toBeVisible,toHaveText,toHaveURL,toHaveAttribute) fails the autotest result.
Did this page help?