# Working with Citrix

The Sherpa RPA platform allows for the automation of applications running in virtualization environments and Citrix remote access windows – both in full-screen and windowed mode (single application mode in a window).

## Installing Sherpa RPA Runtime

On the Citrix server to which the connection will be made, it is necessary to install SherpaRPARuntime.exe in Attended mode following these instructions:

{% embed url="<https://docs.sherparpa.ru/sherpa-orchestrator/razvertyvanie-platformy-pod-upravleniem-orkestratora/ustanovka-sherpa-rpa-runtime>" %}

After the installation is complete, it is recommended to restart the server.

## Installing the Native Citrix Plugin

On the client computer from which the connection to Citrix will be made, it is necessary to install the Sherpa Native Citrix Plugin following these instructions:

{% embed url="<https://docs.sherparpa.ru/sherpa-robot-i-sherpa-assistant/rabota-v-sherpa-assistant/kontekstnoe-menyu-sherpa-assistant/plaginy/ustanovka-plagina-native-citrix>" %}

## Connecting and Working with Citrix

After installing the necessary components, you can start working with applications launched through Citrix. To do this:

* On the local computer, launch Sherpa Robot.
* Use the action recording tool to work with Citrix windows. All interface elements will be highlighted, and selectors will be recorded as usual.
* The recorded selector will contain the Citrix parameter in the first line, allowing it to be identified as an element located in the Citrix environment.

## Using Sherpa Designer Blocks for Working with Citrix

In the "Remote Desktop RDP/Citrix" block palette of Sherpa Designer, special blocks for working with RDP/Citrix are available.

{% embed url="<https://docs.sherparpa.ru/sherpa-designer/spravochnik-blokov/udalennyi-rabochii-stol-rdp-citrix>" %}

These blocks allow you to perform actions within the windows of applications launched through Citrix.

Depending on the Citrix configuration, some universal blocks, such as "Create Connection" or "Connect to Session," may work with RDP connections but not with Citrix connections. In this case, to launch a custom Citrix session, simulate one of the standard user actions using the Robot, according to the operating instructions for Citrix deployed in the specific environment:

* action to launch the Citrix session;
* action to launch the target application within the Citrix session.

Once the connection to the Citrix application is established in the standard way, the Robot will automatically be able to perform actions in the Citrix windows displayed on the screen.

## Interaction Architecture

When working with Citrix, Sherpa RPA uses named data channels (ICA), which provide communication between the client Robot and the remote runtime, transmitting commands to the user interfaces of the target automatable applications running inside Citrix sessions.

The ICA technology is provided by Citrix itself. Using this technology, Citrix transmits images, sound, and data. This scheme allows commands and data to be transmitted between the client and server without the need to open additional ports, as all interaction occurs through the existing Citrix connection.

The interaction scheme of components for automating Citrix applications using Sherpa RPA Robots:

<figure><img src="https://3212714295-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI0zUnKkOuy6lWt7DZ46u%2Fuploads%2Fgit-blob-9223ede9482c81410bf2455f39e01b491ceb41b6%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20(65).png?alt=media" alt=""><figcaption></figcaption></figure>

You can view the scheme in good quality here:

{% file src="<https://3212714295-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI0zUnKkOuy6lWt7DZ46u%2Fuploads%2Fgit-blob-683cddf25afd3a4413c4ef5b70209590b031e348%2F%D0%94%D0%B8%D0%B0%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B0%20%D0%A0%D0%B0%D0%B1%D0%BE%D1%82%D0%B0%20Sherpa%20RPA%20%D1%81%20Citrix.pdf?alt=media>" %}

The data flow looks as follows:

```
Robot (Client PC)
     ↓
[RPC Call]
     ↓
Sherpa Citrix Plugin installed in the client Citrix application
     ↓
[Virtual ICA Named Channels]
     ↓
Citrix Server Environment
     ↓
SherpaRPARemote.exe
     ↓
[Named Channels]
     ↓
Attended Robot (Citrix Server)
     ↓
UI of the target application
```

Description of the Citrix ICA Virtual Channels technology:

{% embed url="<https://support.citrix.com/s/article/CTX116890-citrix-ica-virtual-channels-overview?language=en_US>" %}

## Licensing Components

SherpaRPARuntime.exe, running on the Citrix farm side, is not considered a standalone Robot and therefore does not require a License for its operation. For successful automation of Citrix applications, an active License for Sherpa RPA is only required on the client Robot side.

## Use Cases

Sherpa Robots can perform various tasks in the Citrix environment, such as:

* Automating data entry in applications;
* Processing documents and files;
* Performing routine operations, such as clicking on interface elements and entering text.

Working with Sherpa RPA in the Citrix environment requires certain installation and configuration steps; however, after that, the automation process becomes simple and efficient. Using the Native Citrix plugin and properly configuring the system components allows Sherpa robots to interact with remote applications as if they were running on a local computer.

Any type of Robot can be installed on the local computer:

* Sherpa Designer + Attended Robot,
* Sherpa Attended Robot,
* Sherpa Unattended Robot.

It is from the local computer that the Robot's work script will be launched and executed.

> The plugin installation must be performed under an administrator account (administrator rights are not needed for further operation).

After this, the Robot on the client side can record and replay actions using selectors in Citrix windows.

More about working with selectors:

{% embed url="<https://docs.sherparpa.ru/sherpa-designer/rabota-v-sherpa-designer/paneli-svoistv-i-peremennykh-i-rabota-s-nimi/panel-svoistv/nastroika-selektorov>" %}
