KEMBAR78
QTP Child Objects | PDF | Web Page | Computing
0% found this document useful (0 votes)
62 views1 page

QTP Child Objects

iiyy8

Uploaded by

giri_772
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views1 page

QTP Child Objects

iiyy8

Uploaded by

giri_772
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

QTP - CHILD OBJECTS

http://www.tutorialspoint.com/qtp/qtp_child_objects.htm Copyright tutorialspoint.com

What are Child Objects?


The objects(text box, combo box, links) contained in the frame or Window is known as child
objects. Sometimes we would be in a situation to get the properties of all the links in a webpage or
to get the values of all radio buttons in a window.

In these circumstances if we want to work on the child objects, we need to use description of
objects using which we will be able to work on all the objects in a particular window/page.
Descriptive programming will be dealt in detail in the upcoming chapter but the significance of this
chapter is to understand child objects and its usage.

The below Script gets the all the name of the links from the website "www.easycalculation.com"

Dim oDesc
Set oDesc = Description.Create
oDesc("micclass").value = "Link"

'Find all the Links


Set obj = Browser("Math Calculator").Page("Math Calculator").ChildObjects(oDesc)

Dim i
'obj.Count value has the number of links in the page
For i = 0 to obj.Count - 1
'get the name of all the links in the page
x = obj(i).GetROProperty("innerhtml")
print x
Next

The Result is printed in the output window as shown below :

You might also like