HP QTP interview question 35: Using HP QTP on locked system or with Microsoft Remote Desktop connection

There is a problem with running HP QTP on a locked system or using Microsoft Remote Desktop connection. As soon as QA Tester locks monitor or minimized RDC window HP QTP cannot control anymore the mouse and keyboard and test cases would fail. It seems that most obvious solution is to never lock machine or minimize the desktop session, but what if you need to do other work on machine where Remote Desktop Connection windows is open?
There is another HP QTP trick: connect via Remote Desktop session into first test machine and from that machine hook up into machine with HP QTP installed. Then when someone closes Remote Desktop from the first machine, the remote machines session would stay open. It is strange solution, but it work in our QA Lab environment.

2 comments:

Mark said...

Hi, Can someone please clarify this solution with a better description or even better post a YouTube video?

Thanks,

Mark

subhasis said...

yes QTP doesnt work for any lock system.
if you want to execute any qtp script you have to check that system should not lock..

if want that system will never lock then just write down the below code in a note pad and save with extension in .vbs and execute this .vbs file system will never lock. :)


set WSHELL = Wscript.createobject("Wscript.SHELL")
i=0
While i<60000
WSHELL.sendkeys "{NUMLOCK}"
WSHELL.sendkeys "^"
Wscript.sleep 30000
i=i+1
Wend
set WSHELL = nothing

Common QTP Interview Questions