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

hi what is the use of "dim" in automation objective model or any where what is the use of "dim" plz tell me

3 Answers  


How we can add actions in the test using QTP?

2 Answers  


Hi I know two types of testing processes. 1. Reaquirments stage,test design,code review's, Design review's, Test Plan, Test Cases design, test execution, Defect Reporting and tracking, UAT, Signoff. 2.Test Initiation , Test Plan, Test Design, Execution,Bug tracking, UAT, Sign off.

0 Answers  


who is developed QTP ? is it from Mecury or HP

2 Answers  


How to get line numbers in your editor in expert view?

1 Answers  






How to connect QTP to Testdirector

4 Answers   BirlaSoft, Polaris,


How software tester can use constants and variables in scripts?

0 Answers  


how to do the batch testing in test director using manual testing procedure?

0 Answers  


What are the benefits of qtp?

0 Answers  


What types of testing comes under functional testing or in other word what will you test in functional testing?

3 Answers   Infosys,


i have .xls,.txt,.doc files are there (together). i want find only .xls file among them? how can we write function?

3 Answers   CTS,


Q) Please any body can help me how we can create descriptive programming if the application is not ready i.e we don't have unique property of object ? note:build not ready means we can't use object spy in build to get unique property .

2 Answers  


Categories