Can anyone explain me about child objects in detail;when
they are used and why do we need them ? please give me
sample code for this if possible.



Can anyone explain me about child objects in detail;when they are used and why do we need them ? p..

Answer / babu

Child objects method will be used to find the number of
objects in a particular page, frame etc ..
We can use this child objects method as follows:

Set oDesc = Description.Create()
oDesc("micclass").Value = "Link"
Set Lists = Browser("Login").Page("Application").Frame
("folderFrame").ChildObjects(oDesc)
NumberOfLists = Lists.Count()
msgbox NumberOfLists

By using above statements, you can find the links available
in the frame "folderframe".

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More QTP Interview Questions

what is a test strategy & what is the difference between test strategy & test plan?

5 Answers  


what are the parameters you are considering for object identification?

1 Answers  


Explain quicktest professional (qtp) testing process?

0 Answers  


Hoe we can export TEST RESUALT IN to XL-sheet?

1 Answers   IBM,


To count the no of links present in the yahoo home page i have written the script like this Set fileSysObject=createobject("Scripting.FileSystemObject") Set linksFileName=fileSysObject.opentextfile ("D:\samplelinkfile.txt",2,true) Set linkDescObj=description.Create linkDescObj("micclass").value="Link" Set noOfLinks=browser("yahoo").Page("Yahoo! India").ChildObjects(linkDescObj) For i=0 to noOfLinks.count-1 linkName=noOfLinks(i).getROProperty("name") linksFileName.writeline(linkName) Next linksFileName.close Set fileSysObject=nothing While running the script it showing error that object "yahoo"isnot found in the object repository. Is there any setting before running the script? if yes what is the steps for it.Im using QTP9.0

2 Answers  






What is the difference between qtp and selenium?

0 Answers  


Synchronizing test

3 Answers   Wipro,


what is standalone database

1 Answers   Wipro,


What is test object?

0 Answers  


What is the latest version of qtp?

0 Answers  


What are some test assets and related extensions of qtp?

0 Answers  


suppose i give valid user id and password to open an web base application on qtp.how qtp will know itis a valid user id and password

3 Answers  


Categories