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 only navigation elements (links, nav items).
Incremental observation. Returns only changes since the last observation: elements added, updated,
or removed.
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.