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 (41 actions) |
| Target | Target | Repository element/page or on-step locator |
| Value | Value / value_text | Text, path, URL, key, attribute name, count, class, id, CSS property, or tab title - per action |
| Value source | value_source_type | INLINE, TEST_ACCOUNT, or RUN_PARAMETER |
| 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, the expected attribute contents; may be left empty. For toHaveCSS, the computed property value; required |
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 |
TITLE | title attribute | Title |
ALT | Image alternative text | Alt |
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 |
RUN_PARAMETER | Value is a template. <<name>> is replaced from the run parameter of that name |
Test-account fields for the source: login, password. How-to: Test account values in steps.
RUN_PARAMETER cannot be combined with a repository page on the same step. Put <<name>> in the page Path instead, and keep the step pointed at that page. The same token in an element Locator value or Accessible name is replaced when the step uses that element. Names are collected from the whole project and filled under Run parameters when you create a run. See Autotest run creation.
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. - For
press, Target is optional. Value is a Playwright key string:EnterorControl+Shift+F. Modifiers are onlyShift,Control,Alt,Meta, andControlOrMeta. Details: Key press (press).
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 |
rightClick | Pointer | Required | Unused | No | rightClick |
dblclick | Pointer | Required | Unused | No | dblclick |
fill | Input | Required | Required (text) | Yes | fill |
type | Input | Required | Required (text) | Yes | type |
pressSequentially | Input | Required | Required (text) | Yes | pressSequentially |
press | Input | Optional | Required (key) | Yes | press |
check | Input | Required | Unused | No | check |
uncheck | Input | Required | Unused | No | uncheck |
selectOption | Input | Required | Required (text) | Yes | selectOption |
clear | Input | Required | Unused | No | clear |
selectText | Input | Required | Unused | No | selectText |
hover | Pointer | Required | Unused | No | hover |
focus | Pointer | Required | Unused | No | focus |
blur | Pointer | Required | Unused | No | blur |
scrollIntoViewIfNeeded | Pointer | Required | Unused | No | scrollIntoViewIfNeeded |
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 |
toBeHidden | Expect | Required | Unused | No | toBeHidden |
toBeEnabled | Expect | Required | Unused | No | toBeEnabled |
toBeDisabled | Expect | Required | Unused | No | toBeDisabled |
toBeChecked | Expect | Required | Unused | No | toBeChecked |
toBeEditable | Expect | Required | Unused | No | toBeEditable |
toBeFocused | Expect | Required | Unused | No | toBeFocused |
toBeEmpty | Expect | Required | Unused | No | toBeEmpty |
toHaveText | Expect | Required | Required (text) | Yes | toHaveText |
toContainText | Expect | Required | Required (text) | Yes | toContainText |
toHaveValue | Expect | Required | Required (text) | Yes | toHaveValue |
toHaveCount | Expect | Required | Required (count) | Yes | toHaveCount |
toHaveURL | Expect | Unused | Required (url) | No | toHaveURL |
toHaveTitle | Expect | Unused | Required (title) | Yes | toHaveTitle |
toHaveAttribute | Expect | Required | Required (attribute_name) + expected_value | Yes | toHaveAttribute |
toHaveClass | Expect | Required | Required (class_name) | Yes | toHaveClass |
toHaveId | Expect | Required | Required (dom_id) | Yes | toHaveId |
toHaveCSS | Expect | Required | Required (css_property and expected_value) | Yes | toHaveCSS |
Limits
- For
goto, a full URL must point to a verified team domain (or subdomain). - A failed step in the Expect group fails the autotest result.
Did this page help?