Get Electron Radio Button

The Get Electron Radio Button block is used to locate and retrieve an Electron radio button element from an application window. It can capture values such as the selected index, value, or text of the radio button. This block enables dynamic validation, interaction, or conditional logic based on the radio button state in Electron-based desktop apps.

When fully expanded, the following is an example of the Get Electron Radio Button block:

image-20260209-082806.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 Radio Button onto the canvas.

  2. Specify the basic parameters required for this block to operate:

    1. Connect the green connectors

    2. Set Select Radio Button element.

  3. Run the flow when it’s ready.

Building block parameters

Parameters
  • Block header: The green input connector triggers this block to begin execution. The green output connector triggers when an Electron radio button has been successfully fetched. You can rename the block title by double-clicking the header text and typing in a new title.

  • Select Radio Button element: Contains the locator for the radio button element to fetch. You can capture it by right-clicking and selecting Capture new Electron element, and clear it by right-clicking and selecting Clear Electron element.

  • Found element: Contains the found Electron element in the application window. This output can be connected and reused as a source element in other building blocks (for example to narrow down searches such as table cells).

  • Not found: Triggers if the Electron element is not found before the timeout. This is typically used to branch the flow or to explicitly fail a case by linking it to a Fail block.

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

  • Area found: The application canvas position and size of the found Electron element in X, Y, Width, Height coordinates, starting with the upper-leftmost pixel.

  • Attributes: Contains all attributes on the found Electron element as key–value pairs (including standard HTML attributes such as class/style/href and custom data-xxx attributes). For direct attribute retrieval, use Get Electron Attribute.

  • CSS values: Currently unused.

  • Visible: Returns True if the found Electron element is visible.

  • Selected Index: Outputs the index of the selected radio button option. This output can be connected and used in other building blocks.

  • Selected value: Outputs the value of the selected radio button option. This output can be connected and used in other building blocks.

  • Selected Text: Outputs the text of the selected radio button option. This output can be connected and used in other building blocks.

  • Source element: Lets you limit the locator to only search inside a specific source element by selecting the Element option, so the radio button locator applies within that source element rather than the whole window.

  • Electron window: Contains a handle to the Electron window once it is found and focus is set. You can pass this to other Electron building blocks to direct them to a specific window when multiple windows are open.

  • Use occurrence: Selects which occurrence of the Electron element to use if more than one is found. Select All to iterate through all occurrences.

  • Count: Contains the total number of found Electron elements that match the configured locator.

  • Default timeout: If the checkbox is not selected, the timeout is 10 seconds unless changed manually. If the checkbox is selected, the flow’s Default timeout under Max. run time applies.

  • Timeout (sec): The maximum time spent searching before giving up and triggering Not found.

  • Scroll to find: When set to a value other than None, the block uses scrolling when searching for the Electron element.

  • Max repeats: The maximum number of times to perform a scroll before giving up searching for the Electron element.

  • Amount: The amount of scrolling that will be performed on each scroll repeat.

  • Delay (sec): The delay in seconds between each of the scroll amounts.

  • Require valid images: When selected, any Electron element locator targeting an image (img tag) also validates that the image loads correctly.

  • Scroll into view: When selected, any found Electron element is automatically scrolled into view.

  • Await not found: When selected, the block assumes the element is currently present and waits until it can no longer be found before proceeding.

  • Await DOM change: Delays the search until there have been no changes to the application’s DOM for a specified period (for example three seconds). Regardless of this checkbox, the search proceeds after waiting a maximum of 30 seconds.

  • Await Requests: Delays the search until there have been no active XHR requests for a specified period (for example three seconds). Regardless of this checkbox, the search proceeds after waiting 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