Set Web Cookie‎ | Leapwork Docs

The Set Web Cookie block is used to set a named cookie in the current browser session. It is typically used to simulate login state, store preferences, or control feature flags before navigating to a page.

This block only works with browser windows that were previously opened using the Start Web Browser block or its “child” windows. Browsers started this way begin with empty history, cache, and cookies.

Fully expanded, the Set Web Cookie 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 Set Web Cookie onto the canvas.
  2. Specify the basic cookie details , such Cookie name, Cookie value, Expiration date/time, Domain, Path, and if needed use Text fields for dynamic values and select the target Browser window.
  3. Run the flow when it’s ready; the cookie is set before subsequent web-automation steps execute.

Building block parameters

Parameters

Multiple browser windows are not supported by Selenium Grid or external cloud providers such as Sauce Labs and BrowserStack, so in those environments you typically work with a single available window.

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.