Knowledge Base Article

Home Page > Knowledge Base > Rapise

Article Executing Under a VM or Remote Desktop

by Jim R. on Friday, February 20, 2015

Sometimes you need to test an application running on a VM or remote computer using Remote Desktop (RDP) rather than a physical terminal. This guide explains how to ensure that Rapise is able to correctly fire events on the application under test.

In general, it is not recommend to run Rapise tests using a Remote Desktop (RDP) session where the RDP window is minimized. The best approach is that:

  1. The RDP window should be open and not-minimized
  2. The host machine should be free from any tasks.
  3. Users do not touch the host mouse during testing.
  4. Other activities such as video/audio listening on the host are disabled whilst the test is running on the VM

However if you have to use a minimized RDP window, we recommend using the following workaround:

Background

The Microsoft Windows operating system includes the Remote Desktop component that allows you to connect to a remote computer and work with it as with your local computer. This method is called RDP (Remote Desktop Protocol). The same method is used to connect to a virtual machine. In many cases it is shown to end user by means of the same RDP protocol.

There is problem with this approach: you may not minimize the Remote Desktop window (that is, the window which displays the remote computer’s desktop), or your GUI interactive tasks will fail. If you minimize this window, the operating system switches the remote session to a GUI-less mode and does not display windows and controls. As a result, Rapise will be unable to interact with the application’s GUI as the GUI doesn’t actually exist in this case.

Keeping the Remote Desktop window visible may be inconvenient, as it will occupy some part of or even your entire screen, and you will have less space for running your local applications.

Solution

The workaround is to change Registry keys on your computer (that is, the computer from which you connect to a remote Automate workstation). Here is a step-by-step description:

  1. Close Remote Desktop sessions opened on your computer.
  2. Launch the Registry editor (Regedit.exe).
  3. Locate any of the following Registry keys:

HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\ - if you want to change the RDP settings for your user account.

OR

HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\ - if you want to change the RDP settings for all accounts.

  1. Create a new DWORD value in this key named RemoteDesktop_SuppressWhenMinimized. Specify 2 as the value data.
  2. If you use a 64-bit OS, add the RemoteDesktop_SuppressWhenMinimized value to the following keys under the Wow6432Node node:

HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\Terminal Server Client\ - if you want to change the RDP settings for your user account.

OR

HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Terminal Server Client\ - if you want to change the RDP settings for all accounts.

This way the Registry tweak will work in both 32-bit and 64-bit versions of the Remote Desktop client.

Now minimizing the RDP window on your computer will not affect the remote computer’s GUI and the GUI will still be available to your automated GUI tasks.

Note: The same changes may be achieved by applying following text as a .reg file:

Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Terminal Server Client]
"RemoteDesktop_SuppressWhenMinimized"=dword:00000002
 
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Terminal Server Client]
"RemoteDesktop_SuppressWhenMinimized"=dword:00000002

 

Attachments
Article Info
Last Updated: 2/20/2015
Article ID: KB131
# Views: 2098
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.