Skip to main content

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:
The objective string is the most important input to Kane CLI. How you phrase it determines what the agent does and whether it succeeds. Objectives follow three patterns that you can combine freely.

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’s final_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:
✅ Good: value is captured in final_state:

Combining Patterns

Chain all three patterns in one objective:
This objective: navigates → extracts two values → validates a condition → performs an action → validates the result.

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.
Pointing a mobile run at a website is not supported yet. WebViews inside the app under test are handled. See Mobile Testing.

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:
In Headless CLI, use --max-steps to cap each run:
A good rule: if your objective has more than three assert statements or more than five distinct actions, consider splitting it.