2

I am posting this question regarding the execution of QTP scripts on remote machine. When i log in to my remote machine via "mstsc", and execute the script without closing the remote desktop connection, it works fine. But once i close/minimize the remote desktop window, it starts throwing error ( like Object not visible" error.

One of the places where it generally throws error is while clicking on the file menu in IE, as shown below :-

Browser(" page name -").WinToolbar("ToolbarWindow32").Press "&File"

Are there any workarounds to resolve the same?? Most of the QTP scripts take lot of time to execute, and if the prerequisite is to keep the screen active without even locking, isnt it one of the key disadvantages?

Thanks in advance!!! Steve

Steve Mavros
  • 21
  • 1
  • 2

3 Answers3

3

If you want to run QuickTest in a minimized RDP session, and you are using an RDP >= 6.0 client, you can enable it by setting a registry value on the local computer: Navigate to one of the following registry paths on the local computer:

Current User: HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client or All Users: HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client

Create a DWORD value named RemoteDesktop_SuppressWhenMinimized and set it to 2.

Note that this does not work when the computer is locked or logged off.

huzeyfe
  • 3,554
  • 6
  • 39
  • 49
scenox
  • 698
  • 7
  • 17
3

QTP replays some steps by manipulating the mouse and keyboard devices. When an RDP session is minimized windows knows that there is nobody at the controls and therefore doesn't respond to the mouse and keyboard events which causes QTP to fail.

A workaround to this is to connect to the machine via another application rather than mstsc (for example VNC) which doesn't communicate to windows that it has been minimized. Either that or leave the RDP window open.

Motti
  • 110,860
  • 49
  • 189
  • 262
  • Thanks Motti....Any idea whether this issue will be resolved by connecting to remote machine via VMWare apart from VNC? – Steve Mavros Jun 26 '11 at 20:35
  • @Steve I'm not familiar with VMWare support, the easiest thing is to try and see. `WinButton.Click` uses device replay so it's very simple to check. – Motti Jun 27 '11 at 06:54
  • Thanks Motti...I tried with VMWare and it worked like a charm :) – Steve Mavros Jun 27 '11 at 17:12
-1

one more simple way

just maximize RDP session , then scripts will run don't minimize you remove the lock of the machine.