Smart Resizing of Remote Desktop Windows

Applies to TestComplete 15.68, last modified on October 03, 2024
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 settings of the Remote Desktop connection, save them in an external .rdp file, and then use this file to start a Remote Desktop Connection session with the needed settings. Below is a step-by-step instruction on how to do this.

  1. Open Remote Desktop Connection. The way you do this depends on the operating system you use.

  2. Expand the displayed dialog by clicking Show Options.

  3. In the Connection settings group of settings, click Save As to create an .rdp file that will store the Remote Desktop Connection settings.

    Remote Desktop Connection options
  4. In the resulting Save As dialog, specify the desired name and path for the created file, and then click Save.

  5. Close the Remote Desktop Connection window.

  6. Open the created .rdp file in any editor of your choice, 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.

  7. Double-click the .rdp file 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