Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SystemUtil Block Input method
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Does the 'SystemUtil.BlockInput' method only block the keyboard/mouse operations during execution or will it block the statements in the scripts which has SendKeys/DeviceReplay operations being called??

For Example:

my code is as below:
################################
Code:
SystemUtil.BlockInput
Browser().Page().WebButton().Click
Set WshShell = CreateObject("WScript.Shell")
Browser().Page().WebEdit().Click
WshShell.SendKeys "%f"
Browser().Page().WebButton().Click
################################

Will QTP enters the characters "%f" in the WebEdit even though BlockInput has been used?

Thanks in Advance!!
Surya
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Surya,
systemutil.blockinput method Prevents keyboard and mouse input events from reaching applications.
You can use this method to prevent a run session being accidentally interrupted by someone using the keyboard or mouse on a QuickTest Professional computer.

After using this method, keyboard and mouse input is blocked until one of the following occurs:

An UnblockInput statement is used
A run session ends or is paused for any reason (end of test run, run error, breakpoint, and so forth)
The Ctrl+Alt+Delete key combination is pressed on the keyboard
A critical system error occurs
Hence the characters "%f" will not be sent
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Ravi,

Thanks for providing the info. I tried myself this today on QTP and it worked as said.

Thanks,
Surya
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need to input Japanese Character through UFT Alaguraja 0 900 07-01-2020, 11:32 AM
Last Post: Alaguraja
  SystemUtil.Run is not getting recorded divyan 1 1,814 08-31-2017, 09:06 PM
Last Post: Ankur
  How to get input from the user in QTP? shanthiK 10 18,560 08-07-2017, 11:34 PM
Last Post: zunebuggy
  SystemUtil.Run method is not getting recorded pupuns2 5 8,162 05-12-2017, 01:20 PM
Last Post: Angeliks
  Problem in Input from keyboard:sendkeys Rachna 1 4,973 10-14-2013, 06:07 PM
Last Post: anil2u

Forum Jump:


Users browsing this thread: 2 Guest(s)