Usage
Parameters
Element reference ID from a previous snapshot (e.g.,
@e1, @e2, @e14).Property to read from the element.Options:
text- Text content or valuevalue- Current value (for inputs, sliders, etc.)title- Accessible name or labelbounds- Pixel bounds (x, y, width, height)role- Accessibility rolestates- Array of state strings
Response
Name of the property that was requested.
Reference ID that was queried.
Value of the requested property. Type varies by property:
text,value,title,role: string or nullbounds: object with x, y, width, height or nullstates: array of strings
Examples
Get text from a button
Get value from a text field
Get role
Get bounds
Get states
Get text (default property)
Empty value
Error Cases
Stale ref
Element not found
Invalid ref format
Notes
- The ref must be from the last snapshot. Refs become stale after a new snapshot is taken.
- The command uses optimistic re-identification to verify the element still exists with matching (pid, role, name, bounds_hash).
- For
textandvalueproperties, the command attempts to fetch the live value from the accessibility API. If unavailable, it falls back to the cached value from the snapshot. - For other properties (
title,bounds,role,states), values are read from the cached RefMap (not re-queried from the OS). - To ensure fresh state information, run
snapshotbefore callingget. - The
boundsproperty returnsnullif bounds were not included in the original snapshot (requires--include-boundsflag).