Script fails when the computer is locked (QTP 11.0

2019-08-04 05:28发布

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...

标签: qtp hp-uft
5条回答
甜甜的少女心
2楼-- · 2019-08-04 05:49

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.

查看更多
神经病院院长
3楼-- · 2019-08-04 05:51

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.

查看更多
做个烂人
4楼-- · 2019-08-04 05:56

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!

查看更多
Viruses.
5楼-- · 2019-08-04 06:00

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.

查看更多
兄弟一词,经得起流年.
6楼-- · 2019-08-04 06:07

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!

查看更多
登录 后发表回答