Type Electron Text

The Type Electron Text block types text into a specified Electron element. You can type normal text or mask the input as a password, and you can optionally clear the field before typing. If the element cannot be found within the timeout behavior, the block triggers Not found so you can branch the flow.

Fully expanded, the Type Electron Text block shows the following properties:

image-20260204-112557.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 Type Electron Text onto the canvas.

  2. Connect the block in the flow and specify Select Electron Element to find (required) and Text value. Optionally set Type, Clear field, and Key speed, and use Text fields if you need dynamic values. If needed, set Source element, Electron window, and Use occurred.

  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 the Electron text is successfully typed. You can rename the block by double-clicking the header text and typing in a new title.

  • Select Electron Element to find: Required. Contains the locator for the Electron element to type into. Capture a locator by right-clicking the property and selecting Capture new Electron element. Clear the locator by right-clicking and selecting Clear Electron element.

  • Text value: The text to be typed into the element. This field can contain tokens from Text fields. To insert tokens, right-click and select Insert token.

  • Text fields: Stores key–value pairs that can be inserted into Text value via Insert token. Fields can be renamed by double-clicking them, and the corresponding tokens update automatically.

  • Type: Selects how the value is handled when typing.

    • Text: Types the value as normal text.

    • Password: Types the value as a password. A password value can’t be read by other users.

  • Found element: Contains the found Electron element in the application window. You can reuse it as a Source element in other blocks to narrow down searches (for example, locating table cells inside a specific container).

  • Not found: Triggers if the Electron element is not found before the timeout. 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.

  • Attributes: Outputs all attributes on the found Electron element as key: value pairs, including standard HTML attributes (for example class, style, href) and custom attributes (for example data-xxx). If you need to work with a single attribute directly, use Get Electron Attribute.

  • CSS values: Currently unused.

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

  • Tag name: Returns the tag name of the found Electron element (for example div, tr, button, input).

  • Source element: Limits the Electron element locator to only work inside the provided source element when you choose the Element option.

  • Electron window: Contains a handle to the Electron window once it is found and focused. Use this when multiple windows are open to direct the block to type into an element in a specific window.

  • Clear field: When enabled, any existing text in the selected Electron element is cleared before typing.

  • Key speed: Selects the typing speed. In some cases, typing more slowly may be required to trigger application events.

    • Very slow: Types with a very slow cadence.

    • Slow: Types slower than normal.

    • Medium: Types at a moderate speed.

    • Fast: Types quickly.

    • As human: Types with a more human-like cadence.

  • Use occurred: Selects which occurrence of the Electron element to use if 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.

  • Timeout (sec): Sets the maximum time spent searching for the Electron element before the block gives up and triggers Not found. This field is used when Default timeout is not selected.

  • 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 and type occur 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 and type occur 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