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
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Window title | String | No | Title of the application's window: text it contains, or a pattern with * and ?. | |
| Name | String | No | Name of the control (contains, or * and ?). | |
| Role | String | No | Java accessibility role, e.g. push button, text, label, check box, combo box, table (contains, or * and ?). | |
| Index | Number | No | 0 | Which match to use when several do, 0 for the first. |
| Path | String | No | The control's path from Find Java objects, instead of name and role. | |
| Action | String | No | do_action | do_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. |
| Value | String | No | The 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. | |
| Process | String | No | Part 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) | Number | No | 10 | How long to wait for the control, in seconds. |
| Row | Number | No | Table cells: the row, 1 for the first; select_item: the item's position from 1; scroll: how many times (G4). | |
| Column | Number | No | Table cells: the column, 1 for the first (G4). | |
| Click kind | String | No | left | click and click_cell: left, right or double; scroll: a line or a page at a time (G4). |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | Any | The text read (get_text), the properties (get_properties), or true. |
| object | Dictionary | The control acted on: path, name, role, text and the rest. |