Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
holding a button down for a certain time
#1
Not Solved
Hello,

Please help,

when using QTP, I was clicking on some buttons to simulate ceratin functions. If I want to do the same action but instead of clicking, I like to hold the button down for a duration like 30 seconds, do you know how to do that?

Thanks

tbakk
Reply
#2
Not Solved
Hi tbakk53,

You can use Type method and use the micshift or what ever button you want to press.

Code:
SwfWindow("Window").SwfTable("Table").Type micShiftDwn 'To press the shift key down
SwfWindow("Window").SwfTable("Table").Type micShiftUp  'To release the pressed key. Don't forget this LOC

Please let me know if you need any more info.
Thanks,
SUpputuri
Reply
#3
Not Solved
Hi SUpputuri,
I think you might have forgot to mention to provide wait time in between micShiftDwn and micShiftUp , whatever the duration tbakk53 wants to stay in between. so I have just corrected that in code.
Reply
#4
Not Solved
Hi sasmitakumari,

Thanks for the correction. But I think that is not required becuase he can release the key once he obtained the desired thing happened. He can use the validation check and then release the key.

Anyhow, thanks for the correction.
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to test clicking and holding a mouse button for a certain amount of time? smellybutt 0 2,532 03-11-2009, 11:53 PM
Last Post: smellybutt
  QTP Results file holding my Network password justatester 1 2,152 06-04-2008, 01:43 AM
Last Post: FredMan

Forum Jump:


Users browsing this thread: 1 Guest(s)