Smart Resizing of Remote Desktop Windows

Applies to TestComplete 12.60, last modified on September 17, 2018
Information in this topic applies to desktop and web applications.

By default the Microsoft Windows operating system includes the Remote Desktop component that allows you to connect to a remote computer and work with it as you work with your local computer.

Using this component you can run and monitor automated tests on remote computers: you can connect to a test computer using a Remote Desktop connection and use the Remote Desktop window to work with the remote computer on your PC. For more information on running automated tests by using the Remote Desktop component, see About Running Tests via Remote Desktop.

While running GUI tests via the Remote Desktop component, keep in mind that the Remote Desktop window must be visible on screen. If you minimize the Remote Desktop window or disconnect from the Remote Desktop Connection session, the GUI tests will fail. To work around this problem, see the Running Tests in Minimized Remote Desktop Windows help topic.

However, sometimes, you may need to follow test running, so you may need to control the remote desktop. In this case, the screen resolution on the remote computer must be the same as on the master computer. Sometimes, it may be inconvenient. To work around this problem, you can specify the properties of the Remote Desktop connection in a special way. Below is a step-by-step instruction on how to do this.

  1. Open the "Remote desktop connection" window. To do this, click Start | All Programs | Accessories | Remote Desktop Connection.
  2. Click Options and then click Save As.
    Remote Desktop Connection options
  3. Specify the path to the .rdp file that will store the Remote Desktop Connection options.
  4. Click Save and then close the Remote Desktop Connection options window.
  5. Open the created .rdp file in an editor, for example, in Notepad, and add the following string at the end of the file:
    smart sizing:i:1
    Make sure that the parameters desktopwidth:i:1280 and desktopheight:i:1024 match the server's desktop resolution. You can also change the color settings. For this purpose, replace the value session bpp:i:8 with the session bpp:i:24 string.
  6. Double-click the .rdp file's icon to start a Remote Desktop Connection session.

After that, you can resize the Remote Desktop window as you wish, at that, the window will show the entire remote desktop. So, you can make the Remote Desktop window smaller and you will be able to control your test remotely.

See Also

Running Tests via Remote Desktop
About Running Tests via Remote Desktop
Running Tests in Minimized Remote Desktop Windows
Running Tests
Running Tests on Locked Computers

Highlight search results