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
flag
Return the full accessibility tree instead of just interactive elements.
flag
Return only form-related elements (textboxes, selects, checkboxes, etc.).
Return only navigation elements (links, nav items).
number
default:"50"
Maximum number of elements to return.
flag
Incremental observation. Returns only changes since the last observation: elements added, updated,
or removed.
string
default:"full"
Response tier controlling how much data is returned.
Response Tiers
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.