Skip to main content

Do Action

Performs a specified action on a Java UI element using the Java Access Bridge.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Window Title - The title of the target window containing the Java application.
  • Window Handle - The handle (HWND) of the target window.
  • Full Path - The full path to the target element in the Java application's accessibility tree.
  • Custom Action - A custom action to perform on the element.

Options

  • Action - The predefined action to perform. Default is "_".
  • Wait Timeout (sec) - The maximum time (in seconds) to wait for the element to become available. Default is 5 seconds.

Output

This node does not produce any output values.

How It Works

The Do Action node interacts with Java applications through the Java Access Bridge to perform custom actions on UI elements. When executed, the node:

  1. Gets the action to perform, either from the Custom Action input or the Action option
  2. Waits for the specified Java context to become available based on the Window Title, Window Handle, and Full Path
  3. If the element is found, it performs the specified action using AccessibleActionsToDo
  4. If the element is not found or the action fails, appropriate errors are thrown

Requirements

  • Java Access Bridge must be enabled in the target Java application
  • The target Java application must be running and accessible
  • Valid Window Title, Window Handle, and Full Path to the target element
  • The specified action must be supported by the target element

Error Handling

The node will return specific errors in the following cases:

  • Action cannot be empty
  • Element not found within the specified timeout period
  • Failed to perform the specified action on the element
  • General exceptions during execution

Usage Notes

  • Ensure the Java Access Bridge is properly configured in your Java application
  • The Full Path should be obtained using Java accessibility tools or by inspecting the application's accessibility tree
  • The default timeout of 5 seconds can be adjusted based on application responsiveness
  • Not all elements support all actions; verify the target element supports the specified action
  • If using a Custom Action, ensure it matches the exact name expected by the Java Access Bridge