Observation
Commands for understanding what is on the page before interacting.observe
AI-optimized page observation. Returns interactive elements with stable refs that you can pass to action commands.Flags
Return the full accessibility tree instead of just interactive elements.
Return only form-related elements (textboxes, selects, checkboxes, etc.).
Return only navigation elements (links, nav items).
Maximum number of elements to return.
Incremental observation. Returns only changes since the last observation: elements added, updated,
or removed.
Response tier controlling how much data is returned.
Response Tiers
| Tier | What is included | When to use |
|---|---|---|
full | All fields, metadata, screenshots | First page load, debugging |
interactive | Interactive elements, refs, roles | Most interactions |
minimal | Refs and names only | Rapid polling, confirmation checks |
Incremental Observation
After performing an action, use--diff to see only what changed instead of re-scanning the entire page:
changes: { added, updated, removed } — much smaller than a full observation.
snapshot
Full YAML accessibility snapshot, compatible with playwright-cli.bap observe is preferred over bap snapshot for AI agents. It returns structured data with
stable refs instead of raw YAML.