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 is run-time data?

0 Answers  


In Test Director bug rEPORTS, wHAT ARE THE CONTENTS(fIELDS)? iF yoU PREAPARE BUG REPORT IN eXCEL sHEET , hOW U SEND TO dEVELOPMENT TEAM THRW T.D?

1 Answers  


Hello Guys, Can anybody Explain me about Automation framework?? and how can we prepareAutomation Framework using QTP

3 Answers   CTS, IBM, Sapient,


Explain in brief about the QTP Automation Object Model.

1 Answers  


Which Databases supports for QTP?

2 Answers  






Hai anyone please "Explain about Framework in QTP?"

0 Answers  


how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)

0 Answers  


Write a QTP script to print all the link names displayed in a web page

4 Answers   TCS, Virtusa,


What is the difference between two actions?

1 Answers   Wipro,


what are the mandatory properties for a tex boxc (scenario?)

0 Answers  


how can we group that these test cases only should be automated and in which order you execute that test cases?

2 Answers   BSL,


Why a framework is needed?? Plaese post your answers ASAP

3 Answers   ACC, FD, Mphasis,


Categories