Citrix automation & local windows - working with two windows at a time


My workflow deals with two windows at a time. I have to copy data from local excel application and paste it in a window based application in citrix environment. The copy works at times but not always.


  1. Press CTRL+F to find a record based on Id in Excel (Attach window container for excel and steps related to it)
  2. CTRL+SHIFT+RIGHT to copy the row for the specific id
  3. CTRL+C to copy
  4. Attach window for citrix app
  5. press CTRL+F to find a record based on Id
  6. CTRL+V to paste the record.

Note: I fetch the id value for each row by using for each loop.

The issue is with the citrix window. Though am only dealing with keyboard shortcuts, it is not working always. Any help would be appreciated.

No screenshots and xxaml file due to confidentiality issues


For dealing with two things (or more) at same time you have parallel activity…

can you do it with parallel activity and element exists, so when element exist do this, should not be problem


You said that is not working always …so I guess that works sometimes … do you know exactly when is not working?


I suggest you add some delay between the activities, i’ve noticed that sometimes robots are too fast for their own good. We call it “think time”.

See if this solves occasional “not working” scenarios.

@Carmen @Kemal @Radomir_Ivankovic - Thank you all for your response. I tried adding delay between activities but then it seemed to still produce error. For example, I am sending a keyboard shortcut (CTRL+F) to an Excel app. It works properly for 2 out of 4 attempts. But then in the 3rd attempt it just types in “F” in a excel cell. Type Into doesn’t seem to help as well. Currently I have set the delay to 2s between CTRL and F. Do you think it’s a short timespan?1

Personally, I avoid sending hotkeys, especially in Citrix environment. you never know what pop-up can jump or what loading can be, and your hotkey is not sent where it should be and script crashes.

Much better is to do it with click image and image exists as way to be sure.

I would do it this way:

Image exists
if true

click on start menu or wherever I am sure that exel will be and retry…

Really avoid sending hotkeys, and from what I saw you are working always with hotkeys, it never worked for me properly


Thanks for your response @Radomir_Ivankovic. I thought using keyboard shortcuts is the best approach for citrix

I work sometimes with both, first I do click in a image and then I send a hotkey. You could try and then tell us.

@carmen that is logic thing to do, but it can happen, that just in a moment when you are sending hotkey something pop-up on your local or virtual machine and your hotkey is sent nowhere, so you would need to have precondition and post-condition and to check every hotkey you send, right?


@Radomir_Ivankovic @Carmen - Thanks for your suggestion guys. Currently with delay before activity, it seems to work fine. As @Kemal suggested, I guess robots are too fast and they end up getting confused on where to click, resulting in random clicks. By introducing delay before activity, I don’t encounter this issue right now.

As you are working between multiple windows, rather than relying on copied content on the clipboard, you can try storing the content to a variable in UI path and then use the same variable to write the content in the citrix environment.

@kaderms - Thanks for the response. You mean to say I can copy, for example - 10000 rows to a variable? I didn’t know it was possible. Can you please let me know what is the activity for it? However I am encountering another issue which I have posted already. Can you please help me with these two?

@Carmen @Kemal @Radomir_Ivankovic - As we are in the same discussion, thought of checking this with you as well

I thought you were copying one row at a time

If you want to do one row at a time, you can try Select Range and Copy Selected Text activities. Then use Type Into to write the content back from the variable

Yes @kaderms. I am copying one row at a time from Excel and pasting it in Citrix window. But the issue here is wih citrix window app as the keyboard shortcuts are not behaving as expected

@Carmen @Radomir_Ivankovic @Kemal @kaderms - Guys! Following it up with our last conversation, I have another peculiar issue w.r.t to citrix automation. Can you please share your thoughts on this?

Yes, I would agree that for Citrix, Best Practice is to utilize Hotkeys or Shortcuts. One thing to note that I have encountered is that sometimes the special keys get stuck (key press down) such as the ALT and CTRL Keys, so suggestions have been to ensure that you use the Right Instances of these Keys - ralt and rctrl, or to send a Key Up for ALT prior to sending hotkey or type into.