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

i am entering wrong data or wrong password in a text box and click on submit button .i am getting a popup window with a message Please enter the correct password or data .How can i handle this situation by using QTP.

11 Answers   SAP Labs,


How to create Userdefined Function.Please write the steps ans also provide example where exatcly we use it.

1 Answers   HP,


What is the Risk Analysis? Waht types of risk analysis are there?

1 Answers  


Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know

0 Answers  


How can i Save the snapshots in a specified folders using Scripting in QTP?

1 Answers  






explain all the check point in QTP?

1 Answers   BirlaSoft,


Hi,All How to change background color of a cell in excel using qtp and that too with out using Excel Object.(I am importing the excel sheet by using ImportSheet method)

1 Answers  


For which type of project the iterative model is suitable?

0 Answers  


What are the differences between table and db checkpoints?

0 Answers  


What type of problems one will face with QTP , if too many browsers are opened at a time?

2 Answers  


When a requirement is given to u to automate , What is ur basic approach ?

4 Answers  


Inserting a Call to Action is not Importing all columns in Datatable of globalsheet. Why?

3 Answers  


Categories