Smart Resizing of Remote Desktop Windows

Applies to TestLeft 15.40, last modified on March 17, 2022

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

You can use Remote Desktop to run tests on remote computers.

While running GUI tests via the Remote Desktop, keep the Remote Desktop window visible on the screen.

In addition, the screen resolution on the remote computer must be the same as on your local 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 click Save.

  5. Close the Remote Desktop Connection window.

  6. 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 remote desktop’s resolution.

  7. Double-click the .rdp file to start a remote session.

Now you can resize the Remote Desktop window as you need. The window will show the entire remote desktop.

See Also

Running TestLeft Tests via Remote Desktop
Running TestLeft Tests on Remote Computers

Highlight search results