Remote Desktop Wake-Up

Hi everyone,

I’ve been using robotcorp’s RPA.Desktop library to automate some excel exports from a Citrix VM. I have access to a Windows Azure VM, through which I access the Citrix Workspace. I have mostly been using image matching to click on UI elements, and this works quite well running from the Robot

The problem is that while it works fine if I leave it running on my computer in the Robocorp Lab IDE, it does not work if I close out the VM. This feature looked like the perfect solution:

I was able to set it up, and it seems to start up okay, but it doesn’t properly find UI elements by their image. I set it up to take screenshots on exceptions, and some of them came out black - not sure what’s going on with it.

I wrote the robot in python if that makes a difference. Is there anyway to see a traceback from exceptions or printed statements? And does anyone know if the Remote Desktop Wake-Up feature works with image matching?


There are a couple of things we have found out but haven’t yet had time to document to the RDP guide that might help you out.
The black screen means the session RDP has not opened properly possible reasons for this:

  1. The machine has a legal disclaimer in login
  2. The “Remember me” ticks in the 1st RDP connection where not set

For 1. at the moment we can’t see any other solution than talking with your IT as the legal disclaimer is purpose-built to require a human clicking it. It can be controlled by registry magic but the context is such that any external tools really must not touch this.

For 2. the first check is to test the RDP connection on the target machine, but we have another possible solution thanks to our partners in the community that we need to write up into the guide.

This one also should be done with your IT’s help/permission as the “correct” way to do this would be for IT to set up a GPO for machines that are used in automation executions.

Hi Kari,

To clarify, screenshots do not always result in a black screen, only sometimes. So, I believe that the RDP connection does get established successfully, and seems to partially execute. I made sure to check all the remember me boxes and I don’t believe that there is any legal disclaimer. Perhaps increasing my timeouts to account for the slower processing would help - I’m open to any other suggestions. Will do some further testing and get back to you with results.


Yeah, the randomness rules out both the fixes I suggested because if either of those is the reason it would be constant.
This seems to be a bit of a mystery. The executing part is only running after the RDP login has happened so there should not be any need for any initial startup delays.

Windows revision and version could have something to do with these so if possible can you run command: winveron the machine and snap a picture of the resulting dialog. Should look something like this:

If you can the logs on this case might help us ferret out what is going on. With the RDP case, this is a bit more involved than the normal use cases for our tools.
The logs can be found in:
…under the user that you are running the solution.
If you can just zip the whole folder and send it via email to

Even though the logs on our part do not contain any sensitive data we still don’t want to take any risks with these so we prefer to get them only into our support system.

Br, Kari

So I have done a significant rewrite to my code and though I haven’t tested extensively yet, the screenshots seemed to be working, but I have a couple more questions now.

  1. Is it possible to request a particular resolution when connecting with RDP? All the images I took, and pixel coordinates etc. corresponded to 1920x1080, but it seems the default is something else.
  2. When using Selenium, it is possible to run it in non-headless mode? Because after the login, the page presented is such that you cannot locate HTML elements on it, plus there are some other popups and such to click.

I got the two items you requested in case they help with answering my new questions. Thanks a lot for your time!


Got the logs from C:\Users\my_username\AppData\Local\robocorp\workforce-agent and emailed them.