---
version: "2026"
language: "en"
---
# Flows FAQ

## **How to check the state of a radio button in a desktop application**

You can verify whether a radio button is selected or not by using the **IsSelected** property in Leapwork's Strategy Editor.

**Steps**

1. **Capture the radio button**

   Use a **Find UI Element** block to capture the radio button element.

   ![image-20251112-104456.png](https://docs.leapwork.com/__attachments/a_b7e1f217204ea3d26fb4d70211c133e34f3a18679c897fd8ea51a57e4aef8246/image-20251112-104456.png?cb=a0689d121a8f58bee5f9d81aa9fd4cfe)

2. **Open the Strategy Editor**

   Right-click the captured element and select **Edit UI Element** to open the editor.

   ![image-20251112-104521.png](https://docs.leapwork.com/__attachments/a_a6fb8ef0a91fde0303d593708ca6a011809d3e1dffeb7506cc2b75467733fd84/image-20251112-104521.png?cb=0858930fe6a05fa244749d10518e78fd)

3. **Add the IsSelected property**

   In the **Structure** tab, click the **+** icon to add a property named **IsSelected** , then validate and save.

   ![image-20251112-105515.png](https://docs.leapwork.com/__attachments/a_0979b3d3c87ec99d374d46526788fb479e11975b88c635793697bc0929b49d03/image-20251112-105515.png?cb=5b8fe41c3c9723c55af0b4b5d7f954c2)

4. **Use Get UI Attribute**

   Add a **Get UI Attribute** block and choose **IsSelected** under Desktop Attributes.

   Connect a **Log Message** block to display the value (True or False).

   ![image-20251112-105546.png](https://docs.leapwork.com/__attachments/a_0658ddc26b9cbe51fd29e5ed163f251110dee06a776575a42da3b95da787f46c/image-20251112-105546.png?cb=667e01bb410bed80048c02487344915d)

5. **Run the flow**

   When executed, the result will show:

   * **IsSelected = True** → Radio button is selected

   * **IsSelected = False** → Radio button is not selected

     ![image-20251112-105626.png](/__attachments/a_8684ccac8c3d1b2c151433937ef00bd299a6b1963a870c10a67886b080d31b19/image-20251112-105626.png?cb=7954b6b29451197f25b2948d36bc23d8)

*** ** * ** ***

## What if Leapwork is not able to click on a web element?

Clicking is an essential task when performing automation on web applications.

Even when **Leapwork** is able to validate a web element, sometimes it is unable to click on specific elements due to heavy DOM or complications with iframes. When Leapwork is unable to click, the action will not be completed on the web page.

We can recommend many strategies to resolve this issue.

**Methods:**
Method 1  
Increase the Default timeout and check "Await DOM change" in the Click Web Element block.  
![image-20251119-151349.png](https://docs.leapwork.com/__attachments/a_008ab166dd02050a45cc914a990623dd8cbda12a2c7c90fe0aac2f8a3fe7266a/image-20251119-151349.png?cb=50b7e9cfcd8c68bb81a43d36ed760ad7)

Method 2  
Use the Find Web element with different strategies, preferably the "Root Descended Child" strategy, before the Click Web Element block.  
![image-20251119-152220.png](https://docs.leapwork.com/__attachments/a_0d162d4ec9000b69fba761cf2f33a971f9abdb209b5d9a5c88b280b96fad4193/image-20251119-152220.png?cb=c535c2953faa559794f9d0d3729acf67)

Method 3  
Use Find Web Element and then Click Web Position block.  
![image-20251119-152446.png](https://docs.leapwork.com/__attachments/a_4d82bb827250289632dfb632cb557d2cc75fa826c42c1ba5393e9aa2edbfae68/image-20251119-152446.png?cb=b8b515338bbfb56ac44efbe5301d991f)

Method 4  
Use more than one Find Web Element and then click web element, if the DOM is heavy. Suppose the strategy is like this.  
![image-20251119-152542.png](https://docs.leapwork.com/__attachments/a_bfeda61b597532ce09d129880ff76bbb3c3d1b31532539b539e7d0c3e213f11b/image-20251119-152542.png?cb=b253670284d693f8a392b8db13e1085a)

Now we can split elements into two different Find Web element blocks. Like 'a' and 'div' in first and last, last two 'div' in the other Find Web Element block.  
![image-20251119-152804.png](https://docs.leapwork.com/__attachments/a_50255ce03ea83fb5b91d5ae461d26df88b41500821caeb4f656db491f13a2daa/image-20251119-152804.png?cb=0b549cbab71520066c40661210e884aa)

Method 5  
Try to split the class attribute of the web element.  
![image-20251119-152910.png](https://docs.leapwork.com/__attachments/a_14f3aed71bbda4692036ff292218859ba604eb6b4d36ad35ea37ed8b708ce349/image-20251119-152910.png?cb=80898376442e0ddcd2e3693710656a7c)

If the class attribute is big, then we can split that into two conditions.  
![image-20251119-152952.png](https://docs.leapwork.com/__attachments/a_3edc05a805b1fffd9d510d55a1bd8f945fc79304233bc3a0e4e3765ae3f057b0/image-20251119-152952.png?cb=3a48f89e88031143f80bf1c0a73f11bc)

Method 6  
Use Run Web JavaScript block to click. Use code return arguments\[0\].click()  
![image-20251119-153725.png](https://docs.leapwork.com/__attachments/a_b3bbefb0a0f515989f514193ee9193378e99bd92c8bea01b8228229821c13f3c/image-20251119-153725.png?cb=88165b9da09297447c4ffd3addc59082) Method 7  
Use Click Image or Click Text Blocks and use best practices to capture the image.

*** ** * ** ***

## I am not able to set my dropdown using the **Set Web Dropdown** block

The **Set Web Dropdown** block only works with dropdowns that use a **standard HTML** `<select>`**element** .

If it is not working, your application likely uses a **custom dropdown implementation**.

You can check this by pressing **F12** in your browser to open the Developer Tools, then inspecting the dropdown element.

If you do not see an `<option>` tag, it means the dropdown is custom-built.

**Resolution:**

For custom dropdowns, you can use the **Click Web Element** block instead.

Follow these steps:

1. Add a **Click Web Element** block and click **Capture new web element** to select the dropdown field.

   ![image-20251203-093919.png](https://docs.leapwork.com/__attachments/a_98dbedf289cc747003fa283f2b48a177f9488db74f546c005e0ac8ce3f47e98b/image-20251203-093919.png?cb=b9a45b78cd023f868d5c8af73e441781)
2. Add another **Click Web Element** block for the dropdown options.

3. To capture the options:

   * Press **Escape** to exit capture mode.

   * Open the dropdown manually.

   * Press **Ctrl + F1** to re-enable capture mode.

   * Select the desired option.

4. If your dropdown requires scrolling, enable **Scroll to find** in the block settings.

   ![image-20251203-094011.png](https://docs.leapwork.com/__attachments/a_2cdc287b6c42125b77c3a5cb28fded8904a459b810431018ed10db6de24b03ca/image-20251203-094011.png?cb=494f0f9fe830398c07b4954a6eb1b0a9)

**Dynamic dropdown selection**

You can make dropdown selection **dynamic** by using a **token** in your locator strategy.

For example, if your options use an `<a>` tag with a `CSS` attribute, you can replace the value with a token to select it dynamically at runtime.

*** ** * ** ***

## How to perform keyboard shortcuts in Leapwork flows

When building flows in Leapwork, you may need keyboard shortcuts to trigger actions quickly. Shortcuts help replace multiple blocks with a single keystroke sequence, which simplifies flows and improves execution speed.

Leapwork includes **Mouse and Keyboard** blocks for sending keyboard input. These include **Type Text** , **Press Key** and **Release Key**, and you can use them to perform any required shortcut.
Type Text block  
The **Type Text** block lets you type text and also capture shortcut combinations.

Click **Capture** to record keystrokes, including special keys such as **CTRL+C** , **CTRL+S** , **ENTER** or any other keyboard combination.  
![image-20251204-085824.png](https://docs.leapwork.com/__attachments/a_aae9ab893ee84ff0b1be9ce90efd1433cc8cf829663d38c4dee1de51df3edd75/image-20251204-085824.png?cb=c7cd6beb5b0fea2c1b7811264188503d) Press Key block  
The **Press Key** block is used to press and hold a key.

This is helpful when you need to hold a modifier key such as **CTRL** while performing another action, for example dragging an item with the mouse.  
![image-20251204-085622.png](https://docs.leapwork.com/__attachments/a_4754e1811f67f54fe50571a77e7f48a30fe1038f724ffcfd33eed285f847cdd4/image-20251204-085622.png?cb=1e935a957bc08d49898e1e50b4655709)

It is normally used together with the **Release Key** block.

Shortcuts can be captured by clicking **Capture** and pressing the required keys.
Type Web Text block  
The **Type Web Text** block types text and keystrokes directly into a web browser.

It works the same way as Type Text but is designed specifically for **web applications**, targeting the element captured in the block.  
![image-20251204-085532.png](https://docs.leapwork.com/__attachments/a_0bc3aa5270ae651991c9342de2bcd8d7e6ee59db80f9b589a1806e076838c9d1/image-20251204-085532.png?cb=c0957f04219358a5da0ee94327f2eb6c)

*** ** * ** ***

## How to use loops in Leapwork

Loops let you repeat actions in a flow either a fixed number of times or until a condition is met. In Leapwork, you can do this in two ways:
Option 1. Use Use Occurrence = All  
Many blocks in Web Automation, Desktop UI, and Image and Text support **Use Occurrence**. If an element is found multiple times, you can choose which instance to use.

* Select a single occurrence when you want one element only

* Select **All** when you want to iterate through every matching element

![image-20251222-103808.png](https://docs.leapwork.com/__attachments/a_f0ac30937823930ae13d406112a8da206df3618cb283a6acdcc4aa533ee6d78e/image-20251222-103808.png?cb=85e088ebd695c22b998914a530ca7bb1)

When you set **Use Occurrence** to **All**, two extra properties appear:

* **Current index**

  Shows which element is currently being processed. For example, if three matches are found, it will go from 1 to 3.

* **Completed** output

  The green output connector triggers when all occurrences have been processed.

**Example use case:** reading all values from a dropdown.

Create a dynamic strategy that matches all items, set **Use Occurrence** to **All** , then use a block like **Get Web Text** to read each item.
Option 2. Use the Loop building block  
You can also loop by using the **Loop** block directly. This is useful when you want full control over the number of iterations and the logic inside each iteration.  
![image-20251222-103851.png](https://docs.leapwork.com/__attachments/a_eba3f232cb9051b6c96923b2e90415fdc6e09a673ab5e22b32f09213844a19c5/image-20251222-103851.png?cb=be8ec6fd424da89c80900a7136cd62a2)

Typical setup:

1. Add a **Loop** block.

2. Use the current Loop value as an index.

3. Pass that value into the element strategy (for example, into **Use Occurrence** in a Find Web Element strategy).

This allows Leapwork to select the correct menu item at runtime, one item per loop iter

*** ** * ** ***

## .NET Compiler Upgrade for C# Code Blocks starting release Leapwork 2025.3.0

This article will support in configuring C# block dependencies as per new update in Leapwork .Net framework 8 implemented in Leapwork release 2025.3.0.

**Compilation and execution changes:**

Previously all C# code in C# code block has been compiled using .NET Framework C# compiler. In .NET newest compiler is used instead of .NET Framework one. It means:

* That the code will be compiled and executed as .NET library.

* .NET Framework dependencies, libs and assemblies cannot be used anymore.

* GAC is no more accessible.

* Users / Customers will have to adjust their existing scripts in blocks, including referencing all required .NET libs and their dependencies, replacing previous .NET Framework ones.

* Users / Customers may have to correct "usings" in their scripts.

* Users / Customers will have access to newest C# features and syntax.

**Global Assembly Cache (GAC) Support Change in .NET 8:**

With the introduction of GAC (Global Assembly Cache) **NO** support in .NET 8 builds, we are now **disabling the 'From GAC' option** in the C# code editor window. Moving forward, assemblies can only be referenced using the **'From File'** option.

**Reason:** GAC is Windows specific .NET Framework-based technology, meanwhile .NET is targeting to be cross-platform, and that's why GAC is no more supported. Instead, nuget-package approach is used in .NET.

*** ** * ** ***

## How to enable flow branching using Switch block?

In Leapwork, you often need to run different actions depending on a condition or input value.

The **Switch** block lets you create this kind of branching in a simple way.

The Switch block works by comparing an **Input value** with one or more **case values** .

When a match is found, the flow continues through that specific branch.

By default, the comparison method is **Equal** , and the comparison type is **Input as value**.

Use the Switch block when you want one flow to handle multiple scenarios without building separate flows.  
![image-20251222-141127.png](https://docs.leapwork.com/__attachments/a_c10266b11e4b852f23e55035b36b16ab0288e3961f755436e7274f6562bac372/image-20251222-141127.png?cb=e3b6b214881f8133e949a545650b641d)

*** ** * ** ***

## Is there a building block for IF statements?

Leapwork does not use a traditional IF statement, but most interaction blocks already include **IF-ELSE logic**.

Blocks such as Find Web Element, Click UI Element, Find Image, and others have:

* One **input connector**

* Two **output connectors**

![image-20251222-152356.png](https://docs.leapwork.com/__attachments/a_3bbe913a52baa0442c4a1bd7721eafb13279c098f7d5ee60fd53c9714840fb1d/image-20251222-152356.png?cb=d8a33b99991ca251c130cb2e0fd163f4)

If the action succeeds, the **top green connector** is triggered.

If the action fails, the **Not found** connector is triggered.

For example, when using **Find Image**, the flow continues through the success path if the image is found. If it is not found, the flow follows the failure path.

This same logic applies to blocks used in **Web** , **Desktop** , and **Virtual Desktop** automation.

In addition, Leapwork provides **Compare** and **Switch** blocks, which can be used as direct alternatives to traditional IF statements when more explicit condition handling is needed.

*** ** * ** ***

## Why is my mouse jumping when I capture elements in a virtual desktop?

When automating in virtual desktop environments such as **VMware** or **Citrix** , the system may not provide reliable **offset** information. This can cause sudden mouse jumps while capturing or interacting with elements.

Leapwork offers two capture modes for web elements:

* **Offset** (default): Uses mouse offset information when you hover over the screen to capture elements. This works well in non-virtual environments.

* **Position:**Uses the element's absolute screen position. This is recommended for virtual desktops, where offset data can be missing or inaccurate.

![image-20251222-154223.png](https://docs.leapwork.com/__attachments/a_cd48cad5f758c56afb3ec65a3996354ff9daa779f91d947dc3b428590b648459/image-20251222-154223.png?cb=d8febf55a449717eb18922ca000523f9)

**Resolution**

* If you are working in **VMware or Citrix** , select **Position** mode to ensure Leapwork captures the correct element location and avoids mouse jumps.

* In non-virtual setups, **Offset** usually works fine.

**Additional fix for VMware**

In VMware, you can also reduce mouse jump issues by enabling the mouse optimization setting:

Go to mouse settings and enable **Optimize mouse for games** , then select **Automatic** or **Always**.  
![image-20251222-154259.png](https://docs.leapwork.com/__attachments/a_37baf0c6b81f798a0e352c25dd382c47f3c8e9bb2ad19849b66522b94528705d/image-20251222-154259.png?cb=663a8fa57fb3811d3a5ee5d3e4143394)

*** ** * ** ***

## Can I re-format DateTime values using building blocks?

Yes. By default, Leapwork uses the **system's localization settings** to format DateTime values. You can change this by using the **Generate Date/Time** building block.

When you expand the block, you get access to individual fields such as **Year** , **Month** , **Day** , and **Time** . You can then combine these values in any format you need using **Set Text** or **Type Text** blocks. This approach also works well when you create a reusable custom building block for date formatting.

**Common use cases**

1. **Formatting a DateTime captured from a web page**

   If you capture a date from a web page and need it in a different format, extract the individual date parts and rebuild the format using text blocks.

   ![image-20260108-083820.png](https://docs.leapwork.com/__attachments/a_0344b54b4f9c52797c3370606afba0b73abf9b3bc1b98dccc9a48fbf44bcecb4/image-20260108-083820.png?cb=376416bd48cfe360e6884f2fcfe22ede)

2. **Calculating an offset date or time**

   If you need a future or past date based on a captured DateTime, use the **Offset Date/Time** block.

   Enter the number of days, months, or years to offset and Leapwork will calculate the new DateTime value.

   ![image-20260108-083841.png](https://docs.leapwork.com/__attachments/a_4eaebcef360232c6580fe4c7c4faf3ca4073c5f6109304843167a5f72f89229e/image-20260108-083841.png?cb=1aa0d8694888803fd4561f2028d72df8)

Example: Calculate the date and time 15 days after **02/18/2018 12:00:00 AM**.