Skip to content

Step actions reference

Each English line you write becomes one action in this list. The parser maps natural language to one of these action keys; the executor (Playwright, under the hood) runs them. This page is the complete inventory.

Every step is a single key-value pair. The key is the action; the value is either a string (target text) or an object with a target and other fields:

- click: "Sign in button"
- type:
target: "email field"
text: "user@example.com"
- verifyVisible: "Welcome back"

Some actions accept aliases so multiple natural phrasings map to the same behavior — click and tapOn, type and inputText, verifyVisible and assertVisible. Use whichever reads more naturally.

Any action can take optional: true. If the target element isn’t found, the step is marked skipped instead of failed and the run continues:

- click:
target: "Cookie banner accept"
optional: true

This is most useful for cookie banners, A/B-tested elements, and anything that may or may not be there.

Go to a URL. Waits for the page to finish loading.

- navigate: "https://example.com"

Navigate browser back one entry.

- back: true

Navigate browser forward one entry.

- goForward: true

Reload the current page.

- refresh: true

Open an app by URL. If the value isn’t an http(s):// URL, the step is a no-op (reserved for native-app contexts).

- launchApp: "https://app.example.com"

Click (or tap) an element. If the element is outside the viewport, the executor scrolls to find an in-viewport equivalent before clicking.

- click: "Sign in button"

Type into a field. With a target, fills that specific field. Without one, fills the currently focused input — or the first visible input on the page as a fallback.

- type:
target: "email field"
text: "user@example.com"
- type: "user@example.com" # fills focused/first visible input

Clear a field. Same target rules as type.

- clear:
target: "search input"
- clear: true # clears focused/first visible input

Press a single key. Use Playwright key names (Enter, Escape, Tab, ArrowDown, etc.).

- pressKey: "Enter"

Click and hold for one second. Useful for context menus on mobile-style sites.

- longPress: "thumbnail image"

Double-click an element.

- doubleClick: "row item"

Right-click (context-menu click) an element.

- rightClick: "file in tree"

Move the pointer over an element without clicking.

- hover: "user avatar"

Scroll the page. Direction defaults to down.

- scroll: "down"
- scroll:
direction: "up"

Accepted values: down, up, left, right.

Pick an option from a <select> dropdown. With a target, picks from that specific dropdown; without, uses the first visible select on the page.

- selectOption:
target: "country dropdown"
value: "US"
- selectOption: "US"

Check a checkbox. No-op if it’s already checked.

- check: "I agree to the terms"

Uncheck a checkbox. No-op if it’s already unchecked.

- uncheck: "Subscribe to newsletter"

All assertions wait up to 10 seconds for the condition to become true before failing. There’s no per-step override flag.

Assert an element (or text) is visible. With a string target, falls back to fuzzy text search if the exact text isn’t found — see Locator resolution.

- verifyVisible: "Welcome back"
- verifyVisible:
target: "Sign out button"

Assert an element is not visible.

- verifyNotVisible: "Loading spinner"

Assert exact text content of an element. With elementType: "text" (or just a string), falls back to the same fuzzy text search as verifyVisible.

- verifyText:
target: "page heading"
elementType: "heading"
expected: "Dashboard"
- verifyText: "Welcome back"

Assert an element contains the given text (substring match).

- verifyContainsText:
target: "status message"
expected: "successfully"

Assert the value of an input matches.

- verifyValue:
target: "email input"
expected: "user@example.com"

Assert an HTML attribute equals an expected string.

- verifyAttribute:
target: "submit button"
attribute: "disabled"
expected: "true"

Assert the number of matching elements. With elementType: "checkbox" or "button", counts by ARIA role; otherwise by text match.

- verifyCount:
elementType: "checkbox"
count: 3
- verifyCount:
target: "row item"
count: 5

Assert a checkbox or radio is (or isn’t) checked.

- verifyChecked: "Remember me"
- verifyNotChecked: "Subscribe to newsletter"

Assert an interactive element is (or isn’t) enabled.

- verifyEnabled: "Submit button"
- verifyDisabled: "Submit button"

Assert an element currently has keyboard focus.

- verifyFocused: "search input"

Assert an element has no children or text.

- verifyEmpty: "empty cart message"

Assert the current page URL matches.

- verifyUrl: "https://example.com/dashboard"

Assert the document title matches.

- verifyTitle: "Dashboard — Example"

Pause execution. Defaults to 2 seconds if no value given.

- wait: 5
- wait:
seconds: 5

Use sparingly — every assertion already auto-waits up to 10 seconds. Hard sleeps are usually a sign of a missing assertion.

Wait for the network to go idle (no requests for 500ms). Times out at 15 seconds and continues without failing — the run keeps going either way.

- waitForLoad: true

Wait for an element matching the given text to become visible. Default timeout 10 seconds, override per-step.

- waitForElement: "Dashboard"
- waitForElement:
target: "Dashboard"
timeout: 30000

timeout is in milliseconds.

Capture a screenshot. With a target, captures just that element; without, captures the full page.

- screenshot: true # full page
- screenshot:
target: "search input"
elementType: "input" # element-only

When the test runs in visual regression mode with a saved baseline, the screenshot is compared against the baseline using a vision model. See Visual regression for the comparison mechanics.

Screenshot steps respect optional: true — if the target element isn’t there, the step is skipped, not failed.

A few actions accept multiple keys for readability. They’re identical:

CanonicalAlias
clicktapOn
typeinputText
clearclearText
verifyVisibleassertVisible
verifyNotVisibleassertNotVisible
screenshottakeScreenshot
navigateopenLink
scrollswipe