ChildObjects

March 21, 2009

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

Entry Filed under: QTP Experts, VBScripting. .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


 

March 2009
M T W T F S S
     
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Recent Posts

Categories

Top Posts

Blogroll

QTP Sites

Top Clicks

Pages

Watch videos at Vodpod and other videos from this collection.

Blog Stats

Meta

Archives