run web javascript.md

Run Web Javascript

The Run Web Javascript building block executes a piece of JavaScript in an open browser window. This can be used to trigger events on a web page (for example "exit intent"). This block only works with browser windows that were previously opened using the Start Web Browser block (or their child windows).

Fully expanded, the Run Web JavaScript 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 Run Web Javascript onto the canvas.
  2. Connect the block in the flow and specify the basic parameters required for this block to operate: Script. Optionally, you can adjust other parameters if needed.
  3. Run the flow when it's ready.

Building block parameters

Parameters

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.