Tuesday, May 13, 2014

QTP Script for automation of Google Site by using Keyboard automation process

'Automation of Google Site by using Keyboard automation process

    Option explicit
    Dim owsh, i

'launch google site
systemutil.Run("http:\\www.google.com")

'keyboard automation to select item in cache
Set owsh=createobject("wscript.shell")
'enter keyword in edit box 
owsh.SendKeys("Mindq")

'press down arrow until loop completed by key board automation
For i=1 to 5 step 1
owsh.sendkeys("{DOWN}")
Next
'press Enter key after completion of loop
owsh.sendkeys("{ENTER}")
'close  browser by by pressing (ALT+F4)
owsh.sendkeys("%{F4}")

No comments:

Post a Comment