Step actions reference
Every action a test step can take — clicks, fills, assertions, extraction, network mocking, native gestures — with its fields and the six selector modes.
Every Vera test is an ordered list of steps, and every step has an action that says what it does. This page is the complete list.
Actions are the contract the whole platform is built on: the visual builder offers them, the recorder emits them, the AI generator is constrained to them, and the runner executes them. If something is not in this list, Vera cannot do it in a test.
The list
| Action | What it does | Key fields |
|---|---|---|
goto | Navigate to a URL. Relative URLs resolve against the project base URL. | url |
click | Click an element. | selector |
fill | Type text into an input. | selector, value |
select | Choose an option in a <select>. | selector, value |
check | Check a checkbox. | selector |
uncheck | Uncheck a checkbox. | selector |
hover | Hover over an element. | selector |
press | Press a keyboard key. | key |
wait | Wait for a duration, an element, or a URL. | waitType, value |
screenshot | Capture a screenshot, and compare it to a baseline if one exists. | name, fullPage |
assert | Verify a condition. The step that decides pass or fail. | assertType, selector, condition, value |
use-flow | Run a reusable flow inline. | flowId |
extract | Capture a value from the page into a variable. | selector, variable |
api-request | Call an HTTP endpoint through the run's browser context. | url, method, variable |
mock-route | Stub or block requests matching a URL pattern. | url, value |
unmock-route | Remove a mock installed earlier in the run. | url |
set-clock | Pin the page clock to a fixed instant. | value |
wait-for-email | Wait for an email and capture a code or magic link from it. | variable |
tap | Tap a native element or screen coordinates. Native mobile only. | selector |
swipe | Swipe or scroll between two points. Native mobile only. | — |
if / else / end-if | Conditional branch. See Control flow. | condition |
loop / end-loop | Repeat steps while a condition holds. See Control flow. | condition |
Twenty-five actions. if, else, end-if, loop and end-loop are individual
steps rather than nested blocks — that is deliberate, and
Control flow explains why it matters when you reorder steps.
Assertions
assert is the only action that can fail a test on purpose. Its assertType
picks what is being checked:
assertType | Passes when |
|---|---|
visible | The element is present and visible. |
hidden | The element is absent or not visible. |
text | The element's text satisfies condition against value. |
url | The page URL satisfies condition against value. |
title | The document title satisfies condition against value. |
value | An input's value satisfies condition against value. |
variable | A captured variable satisfies condition against value. |
A test with no assertion still passes as long as no step errors — it proves the flow is walkable, not that the app is correct. Vera tracks this: an assertion that cannot fail is recorded as insensitive and does not count as coverage.
Assertion presets
The builder's palette also offers presets that expand into an ordinary assert
step with its fields pre-filled, so you do not have to remember the selector
shapes for common patterns:
- Assert Toast — a toast or notification appeared, optionally with text.
- Assert Modal — a modal or dialog opened, optionally with text.
- Assert Validation Error — a form or field validation error is shown.
- Wait for Loading — spinners, skeletons and progress bars have gone.
- Accessibility Audit — runs an axe-core audit and records violations.
These are palette conveniences, not extra action types. A saved test contains the underlying step.
Selectors
Any action with a selector field accepts one of six selector modes, so you
can target an element the way it is most stable rather than by CSS path:
| Mode | Matches by |
|---|---|
testid | A data-testid attribute. The most stable choice. |
role | ARIA role, optionally with an accessible name. |
label | An associated form label. |
placeholder | Input placeholder text. |
text | Visible text content. |
css | A raw CSS selector. |
Prefer testid and role. text is the most brittle: it can resolve to a child
node rather than the element you meant, which is why a text-matched click on a
submit button sometimes appears to do nothing.
The recorder chooses for you — see Recording for the ten-tier priority ladder it walks, and how it validates uniqueness before committing to a selector.
Variables in step fields
Any text field can contain {{variable}} tokens, substituted at run time from
project variables, environment variables, the active role's credentials, and
anything captured earlier by extract or api-request. See
Variables for precedence and scope.
Adding an action
Actions are a coordinated contract, not a plugin point. Adding one means editing
the ActionType union and step interface in @vera/shared, the route's Zod
enum, the executor in the runner, and the builder's palette and step editor
together. A step that only exists in some of those places will validate and then
do nothing.
See also
- Control flow —
if/else/loopand how conditions work - Variables —
{{token}}substitution and precedence - The test builder — assembling steps in the UI
- Recording — capturing steps from a real browser session
- Reusable flows — factoring repeated steps out with
use-flow