Wednesday, 4 June 2014

QTP - UFT - What is the object needed to use sendkeys and show how to scroll up on the web page


We need to create an object of WScript.Shell

The below example shows how to use Page Up key to scroll up on the web page

Function navigateTOPageTop()
     Set o1 =Createobject("Wscript.Shell")
     browser("name:=browsername").Page("title:=.*")
.Highlight
     
For s =1to  4
        o1.SendKeys "{PGUP}"
     Next
     Set o1 =nothing
EndFunction 




No comments:

Post a Comment