Posts filed under ‘QTP Experts’

ChildObjects

ChildObjects:Returns the collection of child objects contained within the object.

ChildObjects returns similar type of objects which matches with the properties given in Description of Object… under the parent object

e.g. on google.com,
‘systemutil.Run “www.google.com”
clas=inputbox(“Enter your object class”,”Object Class”,”Link”)msgbox clas

Dim obj
Set obj=description.Create
obj(“micclass”).value=clas
set co=browser(“Google”).Page(“Google”).ChildObjects(obj)
msgbox co.count
For i=0 to co.count-1 If (clas=”Link”) Then val=co(i).getroproperty(“text”) print val End If
If (clas=”WebEdit”) Then val=co(i).getroproperty(“html tag”) attext=co(i).getroproperty(“attached text”) print attext print val End If
If (clas=”WebButton”) Then val=co(i).getroproperty(“name”) print val End If
If (clas=”WebRadioGroup”) Then val=co(i).getroproperty(“all items”) print val End IfNext

Thanks & Regards
Baba Fakruddin.D

March 21, 2009 at 7:16 am Leave a comment


 

May 2012
M T W T F S S
« Mar    
 123456
78910111213
14151617181920
21222324252627
28293031  

Recent Posts

Top Posts

  • None

Top Clicks

  • None

Pages

Watch videos at Vodpod and other videos from this collection.

Blog Stats

  • 695 hits

Archives


Follow

Get every new post delivered to your Inbox.