Skip to main content

Java object action

Act on a control of a Java application: press it (its action), type text into it, read its text, give it the focus, or read its properties. Find it by name and role, or by path.

Command in the Java apps toolkit · id ooa.java_apps/object_action · 12 inputs, 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Window titleStringNoTitle of the application's window: text it contains, or a pattern with * and ?.
NameStringNoName of the control (contains, or * and ?).
RoleStringNoJava accessibility role, e.g. push button, text, label, check box, combo box, table (contains, or * and ?).
IndexNumberNo0Which match to use when several do, 0 for the first.
PathStringNoThe control's path from Find Java objects, instead of name and role.
ActionStringNodo_actiondo_action presses a button, toggles a box or opens a menu; set_text replaces the text of a field; G4 adds clicks, states, selections, tables and cells, trees and menus by path (File > Save), sliders and scrolling, as for other desktop applications.
ValueStringNoThe text to type (set_text, set_cell_text; a password may come from the vault), the item, path, position, text to find or scroll direction (up, down, left, right); or the name of the action to do when the control has several.
ProcessStringNoPart of the Java program's name (its main class or jar, as Get Java applications lists it); narrows the search and is needed for programs named like tools.
Timeout (seconds)NumberNo10How long to wait for the control, in seconds.
RowNumberNoTable cells: the row, 1 for the first; select_item: the item's position from 1; scroll: how many times (G4).
ColumnNumberNoTable cells: the column, 1 for the first (G4).
Click kindStringNoleftclick and click_cell: left, right or double; scroll: a line or a page at a time (G4).

Outputs​

OutputTypeWhat it is
resultAnyThe text read (get_text), the properties (get_properties), or true.
objectDictionaryThe control acted on: path, name, role, text and the rest.