Micro Focus QTP (UFT) Forums
is the script not running when the system is lock? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: is the script not running when the system is lock? (/Thread-is-the-script-not-running-when-the-system-is-lock)



is the script not running when the system is lock? - durairajravindran - 05-13-2008

Hi,

While running the script i am going to lock the system and some time later i open the system but the script is not running it shows only security alert window. Could you tell me once the system is locked then the qtp is not able to identify the object? Note: in my script have alert and security window.



Regards,
Durai.


RE: is the script not running when the system is lock? - keerthi.cit - 05-14-2008

If u r testing a we app, it will not have any problems until u get a popup window. When the system is locked the OS wont allow any key stroke or mouse movement. so the script will not be able to click the popup and will fail.

U can avoid the System lock by Following steps

1. copy & Paste below code in notepad

Code:
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.SendKeys "{CTRL}+{ALT}"

2. Save as keypress.vbs file
3. Schedule in microsoft scheduler (Start> Programs> Accessories> system tools> Scheduled Tasks> Add Scheduled Task)map the .vbs file
4. Schedule for 'n' number of hours...

U r system won't lock.....and qtp will execute the scripts successfully....


RE: is the script not running when the system is lock? - newqtp - 05-14-2008

Can you please explain me what is the use of {ctrl}+{ALT} in this code.What will it do to avoid locking your pc?How it will do??

Just being curious!!!!Thanks for making this forum a gr8 one.


RE: is the script not running when the system is lock? - surya_7mar - 07-07-2008

We cant run any web based scripts that have Pop Up windows, you have to make sure that your machine dont have auto lock off.

You can ask your system administrator to remove auto lock off in your machine, so that i will not lock ever, until you do a manual lock


RE: is the script not running when the system is lock? - SaranKumarV - 12-13-2010

Hi Surya,

Is this workaround works for Windows Application also?

Code:
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.SendKeys "{CTRL}+{ALT}"
OR
Do we need to ask Sys Admin to remove the autolock?

Regards
SaranKumarV