Using Numbers and Variables in Virtual Desktop Automation

Kasper Fehrend

Senior Product Evangelist at Leapwork

An important part of automating virtual desktop applications (Citrix, Remote Desktop, mainframe etc.) is the ability to read and work with numbers from the applications.

Learn how to: 

  • Read numbers from virtual desktop applications
  • Set and get values in variables
  • Use the mathematical operations in virtual desktop applications

Whether automation is used for testing purposes, monitoring of processes, or business process automation, comparing values and using mathematical operations on the numbers is a crucial discipline.

The video below contains example of how to read numbers from virtual desktop applications in a robust and predictable way. It also focuses on the concept of “variables”, which are tokens used for maintaining certain values during the run of either a single flow, a series of flows, or continuous execution.

Please note that the tutorial video involves an older version of the LEAPWORK Automation Platform (formerly called LEAPTEST), but the principles shown are still valid.



This tutorial contains examples of how to use the Get Number building block the best possible way. Using Areas, to ensure the numbers are read from the right location in the application, combined with Formats, is a robust and fast way of reading numbers from virtual desktop applications.

The video also covers how to use the Compare building block to compare disc usages on a local computer for monitoring purposes, and how to use the Set and Get Variable building blocks to calculate the difference over time.

Go back to tutorials for virtual desktop automation.