Log Web Screenshot

The Log Web Screenshot building block captures a screenshot of the browser canvas and logs it during runtime. This block only works with browser windows that were previously opened using the Start Web Browser block.

Fully expanded, the Log Web Screenshot block shows the following properties:

image-20260205-113417.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 Log Web Screenshot onto the canvas.

  2. Connect the block in the flow and optionally specify the basic parameters required for this block to operate, in one line: Browser window, Message, Default timeout, Timeout (sec), Await DOM change, Await Requests. For a minimal setup, just connect its input and output and run the flow.

  3. Run the flow when it’s ready.

Building block parameters

Parameters
  • Block header: The green input connector triggers the block to start executing. The green output connector triggers when the screenshot has been taken. You can rename the block title by double-clicking it and typing a new title.

  • Image File: Provides an output containing the captured screenshot in PNG format. This output can be used as an input in blocks that support image files or other components that require screenshots for processing.

  • Browser window: By setting this property, the building block will use a specific browser window.

  • Await DOM change: Delays the block execution until there have been no changes to the page’s DOM for a specific period of time (for example, 3 seconds). This is useful when waiting for behind-the-scenes updates in JavaScript to occur. Regardless of this checkbox, the screenshot will be taken after waiting a maximum of 30 seconds.

  • Await Requests: Delays the block execution until there have been no active XHR requests for a specific period of time (for example, 3 seconds). This is useful when waiting for behind-the-scenes updates with XHR to occur (for example in enterprise web applications). Regardless of this checkbox, the screenshot will be taken after waiting a maximum of 30 seconds.

  • Message: Allows you to optionally add a custom text message (maximum 250 characters) to the log entry associated with the screenshot. This message can contain contextual information that will be displayed in the keyframe of the log during runtime.

    • The Message field is optional and hidden in the collapsed view to avoid clutter.

    • The field has both input and output connectors, enabling dynamic text input or output chaining to other blocks.

    • When a message is provided (either typed directly or passed dynamically), it appears in the corresponding keyframe during test execution.

    • If no message is specified, the log behaves as before, with no visual or behavioral changes.
      Available from 2025.3.0 onward.

  • Text fields: Stores key–value pairs that can be inserted as dynamic tokens into supported fields (for example, Message) via Insert token.
    To use the value of an added field, right-click inside the Message text box (or any other field that supports tokens), select Insert token, then choose the name of the field you want to insert.
    Fields can be renamed by double-clicking on them, and the corresponding tokens will automatically update their names and visual appearance accordingly.

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.