Skip to main content

Get parent object

Find a captured control and return the control that contains it, one or more levels up or the nearest of a given type (for example the panel or table row around a label), as an object the other Desktop objects actions accept.

Command in the Desktop objects toolkit · id ooa.desktop_ui/get_parent · 4 inputs (1 required), 5 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Captured objectDictionaryYesThe captured object (from Pick object or OneAgentStudio's desktop capture): window, properties with match and use, path and index.
LevelsNumberNo1How many levels to go up: 1 is the direct container.
Control typeStringNoGo up to the nearest container of this type instead, e.g. Pane, Group, DataItem, Table, List, Window.
Timeout (seconds)NumberNo10How long to wait for the object to appear, in seconds.

Outputs​

OutputTypeWhat it is
parentDictionaryThe containing control as a captured object: pass it to Desktop object action, Get desktop table and the others.
nameStringIts Name.
control_typeStringIts type, e.g. Pane, Group, DataItem.
automation_idStringIts AutomationId; empty when it has none.
levels_upNumberHow many levels above the control it is.