Terminal session when minimized\disconnected returns a blank screen upon capturing desktop snapshot Terminal session when minimized\disconnected returns a blank screen upon capturing desktop snapshot selenium selenium

Terminal session when minimized\disconnected returns a blank screen upon capturing desktop snapshot


If you minimize the Remote Desktop window, Windows switches the remote session to the GUI-less mode and does not display windows and controls. As a result, TestComplete (or TestExecute) will be unable to interact with the tested application’s GUI, as it does not exist and your automated GUI test will fail.To work around the issue, you can change the Remote Desktop’s registry settings on your local computer (where you launch the Remote Desktop):On your local computer, close all open Remote Desktop sessions.Launch the Registry editor (regedit.exe).Navigate to one of the following Registry keys, depending on whether you wish to modify the Remote Desktop settings only for the current user or for all users on the computer:

HKEY_CURRENT_USER\Software\Microsoft\Terminal Server ClientHKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server ClientCreate a DWORD value named RemoteDesktop_SuppressWhenMinimized and set it to 2.

Or you can do it programmatically by following steps:

  • Transparent the window
  • Restore the Window
  • Capture
  • Minimize it again
  • Remove transparency


We had similar problem in our project last year...we could find any stable and permanent solution....however here is how a work around worked for us...

We had to run on 5 remote desktops (which will take screens capture as well during failure) ..however as you have figured already if we disconnect session or minimise the RDC Window blank screenshot is captured. Therefore we had added one more VM to connect those other five test boxes. The task for that VM is to keep session active and resized to other 5 boxes...this worked for us.


If you connect a remote desktop to the test machine, make sure to reboot the machine when you are done, otherwise the desktop will remain locked and screen captures will not work.

I don't believe there is any other way around the issue.