Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can hold a key press for 10 seconds ?
#1
Not Solved
Hi
I have to hold a key press for 10 second in my test. Is there any option in QTP\VBscript to do this ?

Please give me an answer...
Reply
#2
Not Solved
Can you check the following and let me know whether it's working or not?

Code:
Print Time

b = DateAdd("s", 10, Time)

Set WshShell = CreateObject("WScript.Shell")

Do While (Time < b)        
        
        WshShell.SendKeys "{ENTER}"

Loop

Print Time

Set WshShell = Nothing
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to press the space bar with send keys method Hari Prasad 5 24,616 06-03-2016, 10:47 AM
Last Post: Vijayaragavan.thangam
  Facing issue with Java Table to press Enter Key from Keyboard Nasir Ahmed 0 4,385 05-23-2014, 08:05 PM
Last Post: Nasir Ahmed
  Postmessage function in QTP for simulating Printscreen key does not work steelbird 3 5,474 07-11-2013, 03:27 PM
Last Post: vinod123
  unable to click webelement by holding shift key tanyamrz 1 3,355 09-14-2012, 05:21 AM
Last Post: kcn
  Send key method does not set value on webEdit object. sandeep arora 1 14,375 04-05-2012, 05:27 PM
Last Post: verma.vik6

Forum Jump:


Users browsing this thread: 1 Guest(s)