Skip to main content

Desktop object action

Find a captured control in a Windows application and act on it: click, set or read text, read properties, select, expand, toggle, check, list items, read a grid, wait for it or get its position.

Command in the Desktop objects toolkit · id ooa.desktop_ui/object_action · 23 inputs (1 required), 3 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.
ActionStringNoclickWhat to do with the object.
Click typeStringNoleftclick: which click to make.
Click methodStringNoautoclick: pattern presses the control through UI Automation without moving the mouse (left click only); mouse moves the pointer and clicks; auto uses a pattern when the control offers one, else the mouse.
Offset xNumberNo0click with the mouse: pixels right of the object's centre (negative for left).
Offset yNumberNo0click with the mouse: pixels below the object's centre (negative for above).
TextAnyNoset_text: the text to enter (a Credential is accepted and never logged).
Clear firstBooleanNotrueset_text: remove the existing text first; false appends.
Text methodStringNoautoset_text: set_value writes the value directly through UI Automation; type sends key presses one character at a time; auto writes directly when the control allows it, else types.
Pause between keys (milliseconds)NumberNo0set_text with typing: pause between characters in milliseconds.
PropertyStringNoget_property: the property to read, e.g. Name, Value, IsEnabled, ToggleState, IsSelected, ExpandCollapseState.
ItemStringNoselect_item: the text of the item to select in a list, combo box, tree or tab control.
Item indexNumberNoselect_item: the position of the item to select (0 is the first), used when item is empty.
Timeout (seconds)NumberNo10How long to wait for the object to appear, in seconds. For wait_disappear, how long to wait for it to go.
If not foundStringNoerrorWhen the object is not there in time: error stops with an error; continue skips this step (result is empty, found is false) and carries on.
Run in backgroundBooleanNofalseWork through UI Automation only: the window is not brought to the front and the mouse and keyboard are not used, so the application can stay behind other windows or minimised. Clicks and text then need a control that supports it (a single left click; text set directly).
RowNumberNoGrid cell actions: the row, 1 for the first (G4).
ColumnNumberNoGrid cell actions: the column, 1 for the first (G4).
Find textStringNoThe text of the cell to find (an exact match first, else the first containing it) (G4).
Scroll directionStringNodownscroll: which way (G4).
Scroll amountStringNolinescroll: a line or a page at a time (G4).
Scroll timesNumberNo1scroll: how many times (G4).
Index from oneBooleanNofalseitem_index counts from 1 for the first item, as Get selected index does; off counts from 0 as older steps did (G4).

Outputs​

OutputTypeWhat it is
resultAnyWhat the action returns: text for get_text, a value for get_property, a dictionary for get_all_properties and get_coordinates, a list for get_children and get_list_items, a table for get_table, true/false for the wait actions.
healed_byStringEmpty when the object was found by its used properties; otherwise the recorded property that found it (update the object).
foundBooleanFalse when the step was skipped because the object was not found (if_not_found = continue).