how to get childobject from .net application. i tried but
its showing child object count zero. but window has child
objects.the following script i written... pls help me how to
get.


set parent=SwfWindow("winodw name")
CheckObjectDescription parent, SwfButton

Public Function CheckObjectDescription(parent, oDesc)
Set oDesc = Description.Create()
oDesc("micClass:").Value ="Swfbutton"
Set children = parent.ChildObjects(oDesc)
cntObj=children.count
msgbox(cntObj)
End function



how to get childobject from .net application. i tried but its showing child object count zero. but ..

Answer / nanda

Hi Check this code...

set parent=SwfWindow("winodw name")
CheckObjectDescription parent, SwfButton

Public Function CheckObjectDescription(parent, oDesc)
Set oDesc = Description.Create()
oDesc("mercury class").Value ="Swfbutton"
Set children = parent.ChildObjects(oDesc)
cntObj=children.count
msgbox(cntObj)
End function

instead of above use this..

set odesc = description.create
odesc("Class Name").Value = "SwfButton"
set childobj = window("<Window name>").childobjects(odesc)
k = childobj.count
msgbox k




Let me know the feedback -----------
nanda.dreddy@gmail.com

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More QTP Interview Questions

what version of test director supports the QTP? does testdirector supports the QTP9.0?

1 Answers  


what are the different kinds of frameworks in automation?

1 Answers   Accenture,


What is the difference between systemUtil and invoke method..?

5 Answers  


I have 2 Environment variable which holds int. I called into my test and addedup. but output is concatenating the values instead of Sum. Ex. Envi("a")= 10, Envi("b") = 20, c= Envi("a")+ Envi("b"). msgbox c ( Ans.1020). How to overcome this pblm? I used the add fn also..

3 Answers   BirlaSoft,


Anybody explain me, the concept of checkpoint declaration in the QTP mainly for the Objects, Pages, Text and Tables ?

1 Answers  






How to make "TEST Batches" in manual testing . How it is possible plz explin in detail?

1 Answers  


Hi, I'm a beginner in QTP and planning of a certification in QTP, but have no idea about it :P. Could anyone please tell me what certifications that a QTP- beginner can take? What is the fees and the syllabus for the certification? Please reply soon. Thanks Vidhya

0 Answers  


how qtp identify two objects having same name, supose objects are in same page also with same name,specify spl feature.

5 Answers   IGT, Microsoft,


hi this is srinivasa(from blr) i complited my B.tech(e.c.e) in 2007 im searching job in s/w testing but idont have freshers resume for s/w testing please send some s/w testing resume for me(fresfers resumes only) advns thnks you

2 Answers  


What is the difference between a Test and a Business Component? Is it necessary to use Business Component while testing an application in the real time?

2 Answers  


You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?

0 Answers   CTS,


What are the different types of recording modes in qtp? Which will be used when?

0 Answers  


Categories