The lifecycle of a step
- Prompt: You write a step like
Click the Sign in button. - Context: The agent reads the page (DOM, accessibility tree, screenshot) to understand what’s in front of it.
- Action: The agent picks an element and issues the action (click, type, scroll, etc.).
- Verification: Built-in stability checks wait for the network and DOM to settle before declaring the step done.
- Cache: The resolved locator and context are written to the step cache.
- Replay: On the next run, Momentic replays from cache, no LLM call, until something changes.
- Heal: When the cached locator misses, auto-heal uses the AI agent to find the element again and updates the cache.
Anatomy of a test
Tests live in your repo as YAML. Each test file is a series of steps; steps can be modules (reusable), variables (environment-aware), or primitive commands. Common step types include AI action, AI check, Page check, Element check, Tap, Type, Click, and Scroll to.The YAML is generated and maintained through the editor, IDs and nested fields
are bookkeeping you don’t write by hand. See a real example in
momentic-ai/examples.
Where things run
- Local: The CLI drives a browser or emulator on your machine. Fastest iteration loop.
- CI: The same CLI runs in your CI pipeline. Results upload to the dashboard at app.momentic.ai.
- Dashboard: View runs, triage failures, manage quarantine, and configure alerts.
Step-based vs. agentic
- Step-based is deterministic and fast. Use it for critical paths.
- Agentic uses AI action to let the agent figure out a flow on its own. Use it for dynamic or high-level scenarios.