Actions reference — browse guides

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

ActionWhat it doesKey fields
gotoNavigate to a URL. Relative URLs resolve against the project base URL.url
clickClick an element.selector
fillType text into an input.selector, value
selectChoose an option in a <select>.selector, value
checkCheck a checkbox.selector
uncheckUncheck a checkbox.selector
hoverHover over an element.selector
pressPress a keyboard key.key
waitWait for a duration, an element, or a URL.waitType, value
screenshotCapture a screenshot, and compare it to a baseline if one exists.name, fullPage
assertVerify a condition. The step that decides pass or fail.assertType, selector, condition, value
use-flowRun a reusable flow inline.flowId
extractCapture a value from the page into a variable.selector, variable
api-requestCall an HTTP endpoint through the run's browser context.url, method, variable
mock-routeStub or block requests matching a URL pattern.url, value
unmock-routeRemove a mock installed earlier in the run.url
set-clockPin the page clock to a fixed instant.value
wait-for-emailWait for an email and capture a code or magic link from it.variable
tapTap a native element or screen coordinates. Native mobile only.selector
swipeSwipe or scroll between two points. Native mobile only.
if / else / end-ifConditional branch. See Control flow.condition
loop / end-loopRepeat 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:

assertTypePasses when
visibleThe element is present and visible.
hiddenThe element is absent or not visible.
textThe element's text satisfies condition against value.
urlThe page URL satisfies condition against value.
titleThe document title satisfies condition against value.
valueAn input's value satisfies condition against value.
variableA 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:

ModeMatches by
testidA data-testid attribute. The most stable choice.
roleARIA role, optionally with an accessible name.
labelAn associated form label.
placeholderInput placeholder text.
textVisible text content.
cssA 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