Compare | Leapwork Docs

Compare Building Block

The Compare building block compares two values A and B, using a comparison method such as “equals” or “less than or equal to”. See the Use Numbers and Variables lesson for an example of how to use the Compare block.

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 Compare onto the canvas.
  2. Connect the block in the flow and specify Value A, Value B, and Comparison method. Optionally select Comparison type when you need to control how values are interpreted.
  3. Run the flow when it’s ready.

Building block parameters

Parameters

Choosing the wrong comparison type can have unforeseen consequences. For example, comparing the text 200,200 with the position 200,50 results in false, but comparing the position 200,200 with the position 200,50 results in true.

The dropdown includes the following options:

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.