Get Text
Retrieves the text content from 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.
Options
- Wait Timeout (sec) - The maximum time (in seconds) to wait for the element to become available. Default is 5 seconds.
Output
- Text - The text content retrieved from the element.
How It Works
The Get Text node interacts with Java applications through the Java Access Bridge to retrieve text content from a UI element. When executed, the node:
- Waits for the specified Java context to become available based on the Window Title, Window Handle, and Full Path
- If the element is found, it checks if the element has accessible text
- If the element has accessible text, it retrieves the text using GetAccessibleTextInfo and AccessibleTextReader
- If the element doesn't have accessible text, it retrieves the element's name from its context information
- Returns the retrieved text
- If the element is not found or text retrieval 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
Error Handling
The node will return specific errors in the following cases:
- Element not found within the specified timeout period
- General error during text retrieval
- 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
- This node works with various text elements including labels, text fields, and buttons with text
- For elements without accessible text, the node will return the element's name instead