Get Electron Checkbox

The Get Electron Checkbox block is used to locate a checkbox in an Electron application window and read its current state. It returns whether the checkbox is checked or unchecked and exposes additional information about the element that can be reused in other Electron blocks.

Fully expanded, the Get Electron Checkbox block shows the following properties:

image-20260119-093809.png

Note: The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

Quick-start

  1. Drag Get Electron Checkbox onto the canvas.

  2. Capture the target checkbox in Select Electron Checkbox to find, then connect the block in the flow and optionally adjust parameters such as Use occurrence, Default timeout, and Scroll to find.

  3. Run the flow when it’s ready and use Is checked, Found element, or Not found to control the next steps in your automation.

Building block parameters

Parameters
  • Block header: Shows the current name of the Get Electron Checkbox block. You can rename it by double-clicking the header and typing a new title. The green input connector starts the lookup when the flow reaches this block, and the green output connector triggers when the checkbox has been found and evaluated.

  • Select Electron Checkbox to find: Contains the locator for the Electron checkbox to search for.

    • Right-click and select Capture new Electron element to capture the checkbox.

    • Right-click and choose Clear Electron Checkbox to remove the locator.

  • Is checked: Returns the current state of the checkbox as True or False.

    • True means the checkbox is selected.

    • False means the checkbox is not selected.

      This value can be used for conditional logic elsewhere in the flow.

  • Found element: Contains the found Electron element in the application window. You can connect this to Source element in other blocks to narrow searches to this element or its descendants, such as specific cells in a table.

  • Not found: Green output connector that triggers if the Electron element is not located before the timeout expires. Use this connector to branch the flow, for example to handle missing elements or explicitly fail the case.

  • Position found: The application canvas position where the Electron element was found, as X and Y coordinates. The top-left corner of the application canvas is position 0, 0.

  • Area found: The position and size of the found element, expressed as X, Y, Width, and Height, starting from the upper-leftmost pixel. The origin 0, 0 is the top-left corner of the screen.

  • Attributes: Lists all attributes on the found Electron element as key–value pairs. This includes standard HTML attributes (such as class, style, href) and any custom attributes (such as data-xxx). For more direct work with attributes, the Get Electron Attribute block is recommended.

  • CSS values: Reserved for future use. Currently, this property is not populated.

  • Visible: Returns True if the found Electron element is visible on screen; otherwise returns False.

  • Tag name: The tag name of the found Electron element, for example div, tr, button, or input.

  • Source element: Lets you scope the search to a specific parent element.

    • You can define a source directly, or choose the Element option to use an incoming element (for example, another block’s Found element) as the search root.

      This is useful when several similar checkboxes exist in different regions of the UI.

  • Electron window: Holds a handle to the Electron window once it has been found and focused. This can be reused in other Electron blocks to target the same window when multiple windows are open.

  • Use occurrence: Selects which occurrence of the matching Electron element to use when more than one is found.

    • Choose a specific index (for example, 1 for the first match).

    • Select All to iterate over every matching element; in that case, the main output is triggered once per occurrence.

  • Count: Contains the total number of Electron elements that matched the locator criteria. This is helpful for assertions or branching based on how many checkboxes were found.

  • Default timeout: Controls how the lookup timeout is determined:

    • When the checkbox is not selected, the block uses an explicit Timeout (sec) value, which defaults to 10 seconds unless changed.

    • When the checkbox is selected, the block uses the Default timeout value defined in the flow settings (under “Max. run time”).

  • Timeout (sec): Sets the maximum time in seconds to spend searching for the checkbox before giving up and triggering Not found. This property is used when Default timeout is unchecked.

  • Scroll to find: When set to a value other than None, instructs the block to use scrolling while searching for the Electron element. This is useful in scrollable content where controls may not initially be visible.

  • Require valid images: When selected, any Electron element locator that targets an image (img tag) will also verify that the image has loaded correctly, for example by validating the image source.

  • Scroll into view: When selected, automatically scrolls any found Electron element into view before returning results.

  • Await not found: When selected, assumes the Electron element is currently present and waits until it can no longer be found before continuing. This is helpful when you need to wait for an element (such as a busy indicator) to disappear.

  • Await DOM change: Delays the search for the Electron element until there have been no changes to the application’s DOM for a specified period (for example, three seconds). This is useful when waiting for behind-the-scenes JavaScript updates. Regardless of this setting, the overall wait will not exceed 30 seconds.

  • Await Requests: Delays the search until there have been no active XHR requests for a specified period (for example, three seconds). This helps avoid searching while the UI is still loading data. Even when this is selected, the search will occur after a maximum of 30 seconds.

Resources

Topic

Description

Flows FAQ

Common questions about creating, running, and managing flows in Leapwork.

Flows Troubleshooting

Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.

Electron Troubleshooting

Guidance and solutions for diagnosing and resolving issues related to Electron-based automation and environments