Skip to main content

Set Checkbox

Sets the state of a checkbox element (check, uncheck, or toggle).

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

  • Handle - The handle of the window containing the checkbox.
  • Window Selector - The selector for identifying the target window.
  • Element Selector - The selector for identifying the checkbox element.

Options

  • State - The desired state for the checkbox. Default is no action.
    • Check - Ensures the checkbox is checked
    • Uncheck - Ensures the checkbox is unchecked
    • Toggle - Switches the checkbox to the opposite state

How It Works

The Set Checkbox node changes the state of a checkbox element. When executed, the node:

  1. Uses the Window Selector and Element Selector to locate the target checkbox element
  2. Retrieves the TogglePattern of the element to determine its current state
  3. Based on the selected State option:
    • Check: Toggles the checkbox if it's currently unchecked
    • Uncheck: Toggles the checkbox if it's currently checked
    • Toggle: Always toggles the checkbox to the opposite state
  4. If no State is selected, an error is raised

Requirements

  • The target element must be a checkbox that supports the TogglePattern
  • Both Window Selector and Element Selector are required to identify the target element

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid Window Selector or Element Selector
  • Element not found
  • TogglePattern not supported by the element
  • No State option selected

Usage Notes

  • The node only performs an action if the current state differs from the desired state (except for Toggle)
  • This node is useful for configuring settings or filling out forms with checkbox options
  • The Toggle option is particularly useful when the current state is unknown
  • The checkbox element must be enabled and visible to be interacted with