Sahi Pro - Working with Minimised and Closed Remote Desktop Connections
Minimised Remote Desktop Connection
When tests are executed on a remote machine using Remote Desktop Connection and the RDC window remains minimised, native events (including taking screenshots) fail to work.
To fix this, one needs to add registry keys on the client machine from which the Remote Desktop Connection is made. NOTE that these keys are to be modified on the client and not the remote machine.
danger
Please be careful while changing the registry entries.
- Launch the Windows Registry as appropriate on your Windows machine
- For 32-bit Windows, find the registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client
For 64 bit Windows, find the registry key:
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Terminal Server Client
- Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized with value 2.
- Run the tests.
Closed Remote Desktop Connection
Sometimes users would want to open a Remote Desktop Connection, start running the tests on the remote machine, and close off the connection from the client while the tests are running.In this case, native events (including taking screenshots) fail to work.
To work around this, please do the following instead of closing the remote desktop connection directly.
- Create a batch file on the Remote machine's Desktop (For example: "disconnect.bat").
- Type the following line in the file -
tscon %sessionname% /dest:console
and save it. - Start off the tests on the Remote machine.
- Do not close the Remote Desktop Connection from the client directly.
- Instead, double click on the batch file. The session will be closed by the remote desktop.