Monday 19 August 2013

Extracting All Objects any Open Webpage in QTP!!!!!!

Set myPage = Browser("creationtime:=0").Page("title:=.*")
Set desc = description.Create  ' represents all the objects in all the applications


Set allPageObjects =    myPage.ChildObjects(desc)
print "Total objects found : "&  allPageObjects.count

For i=0 to allPageObjects.count-1
  print allPageObjects(i).getroproperty("micclass") &" -- " &  allPageObjects(i).getroproperty("abs_x") &" -- " & allPageObjects(i).getroproperty("abs_y")
Next

No comments:

Post a Comment