Wednesday, December 3, 2014

Descriptive Programming in QTP

Descriptive Programming


Set Obj = Description.Create()

Pure Descriptive - Copy and paste below code in your QTP window and press run button, no need to have any OR.

systemutil.Run "www.google.com"

Browser("title:=Google").Page("title:=Google").WebEdit("name:=q").Set "Jaijeet Pandey"

Browser("title:=Google").Page("title:=Google").WebButton("name:=btnG").Click

Set NewObj=Description.Create()
NewObj("micclass").value="Link"
NewObj("name").value="Automation Testing.*"
Set ChildObj=Browser("title:=.*").Page("title:=.*").ChildObjects(NewObj)
Browser("CreationTime:=0").Navigate ChildObj(0).getroproperty("url") 

Leave your comments in case of any query.............

No comments:

Post a Comment