user90
user90

Reputation: 141

Script fails when the computer is locked (QTP 11.0) .Is there any workaround?

I use QTP 11.0. When i run a script and in between if computer gets locked, the script fails.Is there any workaround?

Thanks in advance...

Upvotes: 1

Views: 4246

Answers (5)

user450
user450

Reputation: 1

We can change the settings from control panel "No Screen Saver and Computer Goes to Sleep to Never". Hope this will help you on your local machine.

Upvotes: 0

Karthik K
Karthik K

Reputation: 69

It might be a lazy way.. But actually it works.. Save the below code as vbs file and double clik on it before execution.

do
set w=createobject("Wscript.shell")
w.sendkeys "{NUMLOCK}"
wscript.sleep 5000
loop

It will simply press Numlock , until you stop the script.

Upvotes: 2

Pixie
Pixie

Reputation: 412

I swear by Caffeine. Found here: http://www.zhornsoftware.co.uk/caffeine/ your PC will never be blocked or go to sleep again!

I have also noticed that when the screensaver goes active the screenshots are all black in the Results Viewer!

Upvotes: 0

zeal
zeal

Reputation: 475

Yes, we have a solution for this! You can use some screen saver blocker to avoid this issue.... that would make your computer unlocked until/unless you terminate the blocker process.

You can download this type of tool from google itself! I have never used that for my projects, but heard that there is some option like this. So just have a try - good luck!

Upvotes: 0

HgCoder
HgCoder

Reputation: 1243

You must unlock the computer. QTP/UFT requires an "interactive" desktop session to do much of the automation, and the Windows OS behaves differently when it is locked.

A good way around this issue is to use Virtual Machines for your automation lab that always remain unlocked. Access security is then maintained by the host machine or the client software used to access the VM's.

Upvotes: 2

Related Questions