How-to

Autotest step authoring

Autotest step authoring

Autotest step authoring builds a Playwright scenario on the autotest card: action, Target, Value, and optional timeout. After save, steps are ready for syntax check and for an autotest run.

The source of truth for Target, Value, and TEST_ACCOUNT rules is the data file autotest-actions.json in the documentation repository and the Autotest step reference. Per-action how-tos live under /en/autotests/actions/{action_name}.

Views on the autotest card

The steps block has a View switch with two layouts. The step itself is the same.

Label in the UILayout
PanelStep list on the left, editor for the selected step on the right
CardsEach step is its own card; the editor opens under the selected step

The browser remembers the choice. If the steps block is narrow, the switch is hidden and Cards stays on: the panel does not fit next to the list.

Prerequisites

  1. The project has a CASE or COMMON autotest. Creation: Autotest creation.
  2. A team member role with write access to the project.
  3. For login and password from TEST_ACCOUNT, the queued CASE has a bound test account.
  4. Shared locators already exist in the object repository when you reuse them.

Steps

  1. Open Autotests in the project and open the autotest card.
  2. Add an autotest step.
  3. Choose action_name from the action catalog (see the table below and the per-action how-tos).
  4. Fill Target when the action requires it:
    • an element from the object repository, or
    • an on-step locator: kind and value from ROLE, LABEL, PLACEHOLDER, TESTID, TEXT, CSS, ID, NAME, XPATH, SELECTOR. LABEL is the field label; TEXT is visible text (do not confuse them): Autotest step.
  5. Fill Value when the action requires it. For toHaveAttribute, put the attribute name in Value; put the expected contents in expected_value.
  6. Choose the Value source: INLINE (text on the step) or TEST_ACCOUNT (field login or password of the account). Details: Test account values in steps.
  7. Optionally set timeout_ms for a wait or assertion.
  8. Optionally run Check syntax.
  9. Save the step and the autotest.

The step appears in scenario order on the card. Next - neighboring steps or Autotest run creation.

action_nameHow-to
gotoNavigation (goto)
clickClick (click)
dblclickDouble click (dblclick)
fillField fill (fill)
typePer-character type (type)
pressKey press (press)
checkCheck checkbox (check)
uncheckUncheck checkbox (uncheck)
selectOptionSelect option (selectOption)
hoverHover (hover)
focusFocus (focus)
waitForSelectorWait for selector (waitForSelector)
waitForURLWait for URL (waitForURL)
waitForTimeoutPause (waitForTimeout)
goBackHistory back (goBack)
goForwardHistory forward (goForward)
reloadReload (reload)
toBeVisibleVisibility assert (toBeVisible)
toHaveTextText assert (toHaveText)
toHaveURLURL assert (toHaveURL)
toHaveAttributeAttribute assert (toHaveAttribute)

Full rules table: Autotest step. Binding a catalog Target: Binding a Target from the object repository.

Example: sign-in (goto + fill + click)

Mini scenario: open the sign-in page, fill login and password from the test account, click the sign-in button. JSON array of steps (copy-paste):

json
[
  {
    "action_name": "goto",
    "value_text": "/login",
    "value_source_type": "INLINE"
  },
  {
    "action_name": "fill",
    "target": { "kind": "LABEL", "value": "Email" },
    "value_text": "login",
    "value_source_type": "TEST_ACCOUNT",
    "value_source_field": "login"
  },
  {
    "action_name": "fill",
    "target": { "kind": "LABEL", "value": "Password" },
    "value_text": "password",
    "value_source_type": "TEST_ACCOUNT",
    "value_source_field": "password"
  },
  {
    "action_name": "click",
    "target": { "kind": "ROLE", "value": "button", "name": "Sign in" }
  }
]

A screen capture is a run option (Result screenshot, Screenshot on failure), not an action_name. Typical false failures (import, URL glob, host after COMMON, strict mode): How to author autotest steps without false failures.

Version 1.2.0 · Last updated 2026-09-15

Did this page help?