Skip to main content

Documentation Index

Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

This is the reference for every command that lives inside a test or module’s steps, before, or after array. Each page documents the parameters, shorthand form, and idiomatic examples for a single command. See Test format for the global file shape and Modules for how to call modules from a test.

AI

CommandSummary
actRun an AI agent that performs actions to satisfy a natural-language goal.
assertRun an AI assertion against the DOM, accessibility tree, and screenshot.
assertVisuallyRun an AI assertion using a screenshot only.
extractPull a value off the page with the AI agent and save it to env.

Mouse

CommandSummary
blurRemove keyboard focus from an element (or the active element).
clickClick an element identified by description, CSS, or coordinates.
doubleClickDouble-click an element.
dragAndDropDrag from one element or position to another.
focusMove keyboard focus to an element.
hoverHover the mouse over an element.
mouseDragDrag the mouse a relative delta from an origin.
rightClickRight-click an element to open a context menu.

Keyboard

CommandSummary
copyWrite a value to the system clipboard.
keyDownPress a key down without releasing it.
keyUpRelease a previously pressed key.
pastePaste the current clipboard contents.
pressPress a key or key combination.
selectPick an option from a <select> dropdown.
typeType text into an input, optionally clearing and submitting.

Form

CommandSummary
fileUploadAttach a file to the next file picker the page opens.

Scroll

CommandSummary
scrollDownScroll the page or a container down.
scrollLeftScroll the page or a container left.
scrollRightScroll the page or a container right.
scrollUpScroll the page or a container up.
CommandSummary
closeTabClose the active tab or a matching tab.
goBackNavigate back in the browser history.
goForwardNavigate forward in the browser history.
navigateNavigate the current tab to a URL.
newTabOpen a URL in a new tab and switch to it.
refreshReload the current page.
switchTabSwitch the active tab by index, URL substring, or URL regex.

Waits

CommandSummary
waitPause execution for a fixed duration in milliseconds.
waitForUrlWait until the page URL matches a substring, glob, regex, or domain.
waitForUrlNotToMatchWait until the page URL stops matching a substring, glob, regex, or domain.

Page checks

CommandSummary
checkPageContainsAssert that the visible page text contains a substring.
checkPageDoesNotContainAssert that the visible page text does NOT contain a substring.

Element checks

CommandSummary
checkElementElement-level assertion family for the element itself.
checkElementAttributeElement-level assertion family for an HTML attribute on the element.
checkElementContentElement-level assertion family for the element’s text content.
checkElementNameElement-level assertion family for the element’s tag name.
checkElementStyleElement-level assertion family for a computed CSS style on the element.

Network

CommandSummary
awaitListenerBlock until a previously registered listener captures a request.
getRecordedRequestsRetrieve the list of requests captured by recordRequests.
graphqlRequestMake a server-side GraphQL request and capture the response.
headerSet an HTTP request header on outgoing requests.
mockIntercept a network route and return a custom response.
recordRequestsStart recording every request that matches a URL pattern.
registerRequestListenerStart listening for requests that match a URL pattern.
removeRouteMockRemove a previously installed route mock by key.
requestMake an out-of-band HTTP request and capture the response.

Storage

CommandSummary
cookieSet a browser cookie via a name=value string.
localStorageWrite a key/value pair into window.localStorage.

Authentication

CommandSummary
authLoadRestore browser auth state from a Playwright storage-state file.
authSaveSave the current browser auth state to a Playwright storage-state file.

Visual

CommandSummary
captchaSolve a captcha challenge on the current page.
dialogAuto-handle the next browser dialog (alert/confirm/prompt).
visualDiffCompare a viewport or element screenshot against a golden file.

Connectivity

CommandSummary
offlinePut the browser into offline mode.
onlineRestore the browser’s network connection.

Scripts

CommandSummary
javascriptRun arbitrary JavaScript inside the test runtime.

Control flow

CommandSummary
ifRun a block of steps only when a condition holds.
moduleInvoke a reusable module of steps.

Bare commands

These commands can be written as single-key scalars without an object payload: