Execution of QTP scripts on remote machines

爱⌒轻易说出口 提交于 2019-12-19 04:24:20

问题


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


回答1:


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.




回答2:


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.




回答3:


one more simple way

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



来源:https://stackoverflow.com/questions/6486079/execution-of-qtp-scripts-on-remote-machines

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!