Skip to main content

Set Combobox

Sets the value of a Java combobox 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 combobox element in the Java application's accessibility tree.
  • Value - The value to set in the combobox.

Options

  • 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 Set Combobox node interacts with Java applications through the Java Access Bridge to set the value of a combobox element. When executed, the node:

  1. Waits for the specified Java context to become available based on the Window Title, Window Handle, and Full Path
  2. If the element is found, it retrieves the current value of the combobox
  3. Attempts to find and select the specified value in the combobox using AddAccessibleSelectionFromContext
  4. Iterates through the available selections until it finds the matching value
  5. If the value is found and selected, the operation completes successfully
  6. If the value is not found, it attempts to restore the previous value and throws an error
  7. If the element is not found, 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 combobox element
  • The specified value must exist in the combobox

Error Handling

The node will return specific errors in the following cases:

  • Element not found within the specified timeout period
  • Selection value could not be found in the combobox
  • 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
  • The node will automatically restore the previous value if the specified value is not found
  • This node is specifically designed for combobox elements; other element types may not work correctly
  • The value must exactly match one of the available options in the combobox