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

Idid my qtp course in 2007 june in mind Q i for got to use this tool ,i want to mention in my resume about this ,how can i rectify this ,pls give me any idea .

2 Answers   Quest,


Is the qtp course will help to create a virtual object?

0 Answers  


What is Step generator in qtp? wt is the use? can u any body explain me? plz

1 Answers  


I have 3 browsers i want to give facebook url in 2 nd browser using qtp

3 Answers   Tech Mahindra,


why use Description programming? what is advantages and disadvantage of this methods?

2 Answers  






How we test the logo or images in the web page using QTP? For example take google page, they change their logo for new year,christmas etc..How we test that? Plz answer this question... Thanks in advance..

2 Answers  


Explain the differences between table and db checkpoints?

0 Answers  


in login module login button chage regularly(means login button change to submit button).What is the code for it.

3 Answers  


How to use regular expression in descriptive programming?

0 Answers  


how we connect oracle or sql data server database to qtp.

4 Answers   TCS,


As u told write Libarary files in QTP. Do u use ever oject repositary 0r spy while writing scripts and for which type of testing u prepared test scripts.

1 Answers  


For ex we are doing automate testing in that can we do some part of application recording, some part descriptive programing and some part general VB scripting like that .............

3 Answers   Satyam,


Categories