ChildObjects

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

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. Tags: .

Function Returns multiple values? Check it out ActionTemplate

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

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

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.