async/await is
supported. Return values are passed to downstream steps and must be
JSON-serializable.
Execution contexts
Browser steps don’t have access to the Node sandbox globals.
Timeout
JavaScript steps default to a 90 second timeout. Configure per step via the Timeout field, or in YAML (value is in seconds):email.fetchLatest or sms.fetchLatest polls for
longer than the JavaScript step’s own timeout, the step is killed before the
helper returns. Set the step’s Timeout to comfortably cover the longest
nested poll.
{{ }} templating
Any string input on any step can contain {{ expression }}. Expressions
evaluate at runtime and are interpolated into the value.
Momentic utilities
Provided by the Momentic runtime.env
Read-only map of the current environment’s variables. See
Variables for how variables are resolved.
setVariable(name, value)
Write a variable scoped to the current test run. Downstream steps can read it
via {{ name }} in any string input, or via env.name inside JavaScript.
email
Send and fetch email. See Email for inbox setup.
sms
Send and fetch SMS. See SMS for number setup.
extractCookiesFromResponse(response)
Convert a fetch / axios response’s Set-Cookie headers into an array of
Playwright-compatible cookies. Useful for bootstrapping an authenticated browser
context.
mock
Only available in mock handler steps on mocked routes. Exposes the
intercepted Request and the upstream Response.