Using Claude Code, Cursor, or another coding agent? Paste this into your prompt to run cross-browser and real-device tests, debug sessions, and wire up CI on the TestMu AI cloud:
Three Patterns
Assertions and extractions are evaluated as Checkpoints. See the reference for all analyze methods (Visual, Textual, URL, Title, DevTools) and comparison operators.
Actions
Use imperative verbs to describe what the agent should do:Assertions
Assertions validate page state. The test fails if the condition is not met.Extractions: The “store as” Pattern
Extractions read a value from the page and store it in the run output’sfinal_state field.
Always use the explicit store X as 'name' syntax. Vague phrasing like “tell me” or “read” does not reliably capture data.
❌ Bad: agent may see it but won’t persist it:
final_state:
Combining Patterns
Chain all three patterns in one objective:Real Examples
Login flow
Search with filters
Settings change
Checkout
Assertion Types
Dos and Don’ts
Objectives on Mobile
Objectives are written the same way for a native mobile app as for the browser. The difference is what the run points at: a mobile run installs an app you supply with--app, so the objective describes app screens and controls rather than a URL.
Splitting Long Objectives
Objectives with more than 15 steps drift and become unreliable. Split them into multiple runs. In Interactive TUI, the browser stays open between runs: state carries over automatically:--max-steps to cap each run: