## Get Electron Text

The **Get Electron Text** block fetches text from a specified **Electron element**. If the element cannot be found within the configured timeout behavior, the block triggers **Not found**, which can be used to branch the flow.

Fully expanded, the **Get Electron Text** block shows the following properties:

**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 Text** onto the canvas.
2. Connect the block in the flow and specify **Select Electron Element to get text** (required). Optionally set **Find format**, **Filter**, and selection settings such as **Use occurred**. If needed, set **Source element** and **Electron window** to limit where the block searches.
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 is triggered when the Electron text is successfully fetched. You can rename the block by double-clicking the header text and typing in a new title.

- **Select Electron Element to get text**: **Required.** Contains the locator for the Electron element from which the text is extracted. Capture a locator by right-clicking the property and selecting **Capture new Electron text**. Clear the locator by right-clicking and selecting **Clear Electron text**.

- **Text found**: Outputs the text that was retrieved from the Electron element.

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

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

- **Area found**: Outputs the application canvas position and size of the found Electron element as **X, Y, Width, Height**, starting with the upper-leftmost pixel. The top-left corner of the screen is **0, 0**.

- **Source element**: Limits the Electron element locator to only work inside the specified source element when you choose the **Element** option. This is useful when you want the locator to search within a specific region or parent element instead of the full window.

- **Electron window**: Contains a handle to the Electron window once it is found and focused. Use this when multiple Electron windows are open to direct the block to fetch text from a specific window.

- **Find format**: Defines a format the text must match in order to be retrieved. For example, with a format like `Status: [TEXT] today`, only the text inside strings such as `Status: Green Mode today` is returned.

- **Is case sensitive**: Controls whether **Find format** matching is case sensitive. By default, matching is case insensitive.

- **Filter**: Applies an additional filter to the retrieved text. For example, you can filter to only retrieve numbers or only retrieve text that matches a specific pattern or rule.

- **Use occurred**: Selects which occurrence of the Electron element to use when more than one match is found. Select **All** to iterate through all occurrences.

- **Count**: Outputs the total number of found Electron elements that match the locator.

- **Default timeout**: Controls whether the block uses the default timeout from the flow settings or a custom timeout value.

- **Scroll to find**: Controls whether the block scrolls while searching for the Electron element. When a value other than **None** is selected, the block uses scrolling during the search.

- **Scroll into view**: When enabled, any found Electron element is automatically scrolled into view.

- **Await DOM change**: Delays the search until there have been no DOM changes for a specified period (for example, three seconds). This is useful when waiting for behind-the-scenes JavaScript updates. Regardless of this checkbox, the search occurs 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 occurs after waiting a maximum of **30 seconds**.

## Resources

| **Topic** | **Description** |
| --- | --- |
| [Flows FAQ](https://docs.leapwork.com/faq/latest/leapwork-flow-faq/flows-faq) | Common questions about creating, running, and managing flows in Leapwork. |
| [Flows Troubleshooting](https://docs.leapwork.com/troubleshooting/latest/leapwork-flow-troubleshooting/flows-troubleshooting) | Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork. |
| [Electron Troubleshooting](https://docs.leapwork.com/troubleshooting/latest/leapwork-flow-troubleshooting/electron-troubleshooting) | Guidance and solutions for diagnosing and resolving issues related to Electron-based automation and environments.
