osmates agent elements
List the controls on the screen, with refs and boxes, in Windows, macOS and a Linux desktop.
osmates agent elements [<options>] <machine>Arguments
<machine>RequiredThe machine's name or identifier, as vm_list shows it.
--scope <scope>focused, screen or element. Default: focused.
--ref <ref>With --scope element: the ref whose subtree to read.
--max-depth <max-depth>Levels to read. Default: 30, or 3 with --mode skeleton, which reads 99 at most.
--max-elements <max-elements>Elements to read at most, also unlisted ones. Default: 500.
--include-offscreenList elements scrolled or collapsed out of view.
--mode <mode>full, interactive or skeleton. Default: full. interactive reads windows, the focused element and those that take an action other than focus and scroll_into_view. skeleton reads the first levels, each element with its count of children.
--since <since>A readId this session got: list only what was added, removed or changed since that read, read again with its scope, mode and limits.
--coordinate-space <coordinate-space>display, screenshot or normalized_1000. Default: display.
--screenshot-width <screenshot-width>With --coordinate-space screenshot: the width of the screenshot the coordinates are in.
--timeout-seconds <timeout-seconds>Seconds the guest takes at most. Default: 5.
--jsonPrint the tool's structured content as one line of JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/agent/elements.json
coordinateSpacestringRequiredOne of
display,screenshot,normalized_1000.elapsedintegerRequiredelementsobjectRequiredelements.guestDataarray of objectsRequiredframeIdstringRequiredlistedintegerRequiredAt least 0.
modestringRequiredOne of
full,interactive,skeleton.readIdstringremovedobjectremoved.guestDataarray of objectsRequiredscopestringRequiredOne of
focused,screen,element.sincestringsinceTruncatedstringOne of
depth,elements,time,size.truncatedstringOne of
budget,depth,elements,time,size.unchangedintegerAt least 0.
walkedintegerRequiredAt least 0.
Fields nested deeper are in the schema.
Exit statuses
Its exit status is one of these.
| Status | Meaning |
|---|---|
| 0 | The command did what it was asked. |
| 1 | The command failed; with --json, standard error's last line is the error object. |
| 64 | The command line is wrong, as ArgumentParser found before the command ran. |
| 65 | What was given is wrong, found while the command ran; the same command fails until it changes. |
| 75 | The same command can work later with nothing changed, as while an update finishes. |
| 130 | Control-C cancelled what the command started. |