Saturday, March 21, 2009

Child Objects

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,
'systemutil.Run ""
clas=inputbox("Enter your object class","Object Class","Link")msgbox clas

Dim obj
Set obj=description.Create
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

No comments: