Request an invite
Docs menu

osmates agent elements

List the controls on the screen, with refs and boxes, in Windows, macOS and a Linux desktop.

Usage
osmates agent elements [<options>] <machine>

Arguments

<machine>Required

The 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-offscreen

List 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.

--json

Print 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

coordinateSpacestringRequired

One of display, screenshot, normalized_1000.

elapsedintegerRequired
elementsobjectRequired
elements.guestDataarray of objectsRequired
frameIdstringRequired
listedintegerRequired

At least 0.

modestringRequired

One of full, interactive, skeleton.

readIdstring
removedobject
removed.guestDataarray of objectsRequired
scopestringRequired

One of focused, screen, element.

sincestring
sinceTruncatedstring

One of depth, elements, time, size.

truncatedstring

One of budget, depth, elements, time, size.

unchangedinteger

At least 0.

walkedintegerRequired

At least 0.

Fields nested deeper are in the schema.

Exit statuses

Its exit status is one of these.

StatusMeaning
0The command did what it was asked.
1The command failed; with --json, standard error's last line is the error object.
64The command line is wrong, as ArgumentParser found before the command ran.
65What was given is wrong, found while the command ran; the same command fails until it changes.
75The same command can work later with nothing changed, as while an update finishes.
130Control-C cancelled what the command started.

Report a problem with this page