Handle Electron Alert

The Handle Electron Alert block is used to manage system alerts triggered by Electron-based applications. These alerts typically appear as native modal dialogs and can interrupt test execution if not handled. This block allows you to define how the alert should be addressed, either by accepting or dismissing it, and optionally lets you interact with alerts that include text input.

It is commonly used in flows that automate Electron apps with multiple confirmation or prompt dialogs during execution.

When fully expanded, the following is an example of the Handle Electron Alert block:

image-20251120-084946.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 Handle Electron Alert onto the canvas.

  2. Choose the required Action (Accept or Dismiss).

  3. If needed, enter a Text value or connect the correct Electron window.

  4. 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 alert has been successfully handled. You can rename the block by double-clicking the header text and typing in a new title.

  • Action: Choose whether to Accept or Dismiss the alert.

  • 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 handling the alert before giving up. This value is used when Default timeout is not selected.

  • Electron window: Contains (or lets you target) a handle to the Electron window once focus is set. Use this to direct the block to a specific window when multiple windows are open.

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