> For the complete documentation index, see [llms.txt](https://docs.visualyze.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visualyze.ai/getting-started/rpa-studio/record-and-execute/desktop-automation-recorder.md).

# Desktop Recorder

Record your Windows workflow using Desktop Automation Recorder

## Recording

Desktop Recorder works in two modes.

1. Manual
2. Automatic

The manual mode allows you to add new steps manually.<br>

![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-38d7f81313970f63e4fb26c7cbd50f2d0a284fa3%2FDesktopSelection%20\(1\).gif?alt=media)

The Automatic mode records all the user actions automatically and creates a list of steps with UI elements, user action and the text inputs from the user.

![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-30d0f115be273c93371ab441b9bf69e99c1da9c8%2FDesktopRecording%20\(1\).gif?alt=media)

## Actions

There are four types of actions in Desktop Recorder. But only Desktop Action (or simply 'Action') is recorded in automatic mode.

1. Desktop Action
2. Store Variable Action
3. If Condition Action
4. Wait Condition Action

### Desktop Action

A simple action performed on a UI Element.&#x20;

*see* [*Desktop Actions*](/getting-started/rpa-studio/record-and-execute/desktop-automation-recorder/desktop-actions.md) *for more info*

### Store Variable Action

Get the specified property from an UI Element and stores it in a Variable.

*see* [*Desktop Element Properties*](/getting-started/rpa-studio/record-and-execute/desktop-automation-recorder/desktop-element-property.md) *and* [*Variables*](#variables) *for more info*

### *Nested Actions*

If Element Condition Action and Wait Condition Actions can have child actions creating nested actions.

![nested actions in Desktop Recorder](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-91d1344917c6c697919718b927948f2d1e2a63ee%2Fimage%20\(151\).png?alt=media)

### If Condition Action

Checks for a condition with a UI Element and executes nested actions if true.

*see* [*Conditions* ](#conditions)*for more details*

### Wait Condition Action

Waits for a condition with UI Element to become true until timeout, then executes the nested actions. If timeout expires, the nested actions will not be executed. The timeout is given in the format `hh:mm:ss`

*see* [*Conditions* ](#conditions)*for more details*

## Elements

<div align="left"><img src="https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-50ccac48e68ad4dfc20bd65fb0c07a7286a71a11%2Fimage%20(157).png?alt=media" alt="Elements pane in Desktop Recorder"></div>

A Desktop Element contains the hierarchy of the target element from its ancestors. This hierarchy is used during playback to find the target element.

{% hint style="info" %}
The 'Desktop' is the root element for all Desktop Elements.
{% endhint %}

### Adding Elements

Elements are added automatically during recording. An element can be added manually by clicking the Add Element From Screen Button in Elements Pane or in the Element selector dropdowns present in all the steps which takes an Element as an input.

### Editing Elements

Elements can be edited by clicking the Edit button in the elements pane. This will open the Desktop Element Selector Editor Window which shows all the added elements in the recording.

*See* [*Desktop Element Selector Editor*](/getting-started/rpa-studio/editor-windows/desktop-element-selector-editor-window.md) *for more details.*

### Element Properties

The following are the properties of a Desktop Element.

#### Automation Properties

* NameProperty\
  The Name of the element.
* ClassName\
  The Class name of the element.
* Automation Id\
  The Automation Id of the element
* Index\
  The position of the element inside its parent with respect to its siblings
* ControlType\
  The type of the element.\
  *See* [*Control Types*](https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-controltypesoverview#current-ui-automation-control-types)\_\_
* Parent\
  The Parent element
* Children\
  The Child elements of the element.

#### Other Properties

* Name\
  The user provided name of element. This is autogenerated when a new element is added.
* Process Id\
  The Process Id of the elements parent process.

## Variables

All [`User Created Variables`](/getting-started/rpa-studio/variables/user-defined-variables-1.md) in studio appears in the variables pane in Desktop Recorder. And user can create new Variables from inside the recorder using the Add Variable Button. This will open the Create Variable Popup. Only string variables can be created from Desktop Recorder.

### Using Variables in Recorder

Variables are assigned to the variable input in Store Variable Action. In addition to that variables can be given in the text input fields of Type and KeyInput actions. Following rules are used for distinguishing Variables from strings.

![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-a5d63894d4f0ee2b378f3df58c920ea9f3eb6a32%2Fimage%20\(164\).png?alt=media)

1. Text given inside two double-quote (") characters are considered as normal string.
2. Text given without two double-quote (") characters around are considered as a Variable.
3. Text given inside two backquote (\`) characters are considered for Variable replacement. Variables are placed inside curly braces ({}) following a dollar ($) character.

## Conditions

A Condition is a statement which always evaluates to either True or False. All Condition Actions evaluate a condition before executing its inner steps (only if the condition is true). There are two types of condition

1. Element
2. Boolean

### Element Condition

Checks for a condition with the element. This can be checking if an Element is in a particular state or have a specific value. Element conditions are used inside If Condition Action and Wait Condition Action.

*see* [*Desktop Element Conditions*](/getting-started/rpa-studio/record-and-execute/desktop-automation-recorder/desktop-element-conditions.md) *for more details*&#x20;

### Boolean Condition

Boolean condition enables joining multiple conditions. There are four types of Boolean Condition. They differ in the way they joins the first and second conditions and generate the result.

* Done\
  result of the first condition. (There is no second condition)
* Not\
  Inverts the result of the first condition. (There is no second condition)
* And\
  True if both first and second condition are True, else False.
* Or\
  True if at least one of first and second conditions are True, else False.

### Condition Evaluation

There are several rules to consider when creating conditions.

1. The first condition of the Boolean Condition is always an Element Condition.
2. The second condition of a Boolean Condition is always a Boolean Condition.
3. All Conditional actions holds only one condition which is a Boolean Condition.

![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-c4835adf0d48d5219d651ce8f1e0cd045887967b%2Fimage%20\(160\).png?alt=media)

According to the rules this condition will be evaluated as

<mark style="color:green;">`(is present OR`</mark><mark style="color:yellow;">`(is absent AND`</mark> <mark style="color:orange;">`(is present NOT)`</mark><mark style="color:yellow;">`)`</mark><mark style="color:green;">`)`</mark>

<mark style="color:green;">\`\`</mark>

## Loading and Saving

<div align="left"><img src="https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-8de54766174d426c053edd2d2c93776acfa63da1%2Fimage%20(162).png?alt=media" alt="import , save and Add to Workflow"></div>

A recording can be saved to the computer using the Save Button. The saved recording has an extension `.vrec.` A saved recording file can be opened using the Import Button.

A recording can be integrated to the Workflow using the Add to Workflow option. This will create a Desktop Automation Session Activity in the workflow.
