how to get the object count ?????????

Answer Posted / karthik

Option explicit
Dim childs, n, odesc
systemutil.Run "C:\WINDOWS\system32\calc.exe"
Set odesc=description.Create
odesc("micclass").value="WinButton"
set childs= Window("text:=Calculator").childobjects(odesc)
n=childs.count
print "number of buttons is "&n
Window("text:=Calculator").Close


The above script perfectly gives you with the answer. Just
copy and Paste it in your QTP and run it. NO modifications
required

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of environment variables in qtp?

563


How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined

1477


Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.

1575


how can we test the Triggers, Cursors, Indexes while doing Database testing in DTP??

1600


What is the difference between analog and low level recording?

635






Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in

1612


How to handle dynamic objects in quicktest professional (qtp)?

558


What is meant by Step generator?what is the use of this? we have 3 steps know there what r all those.? can u all pls give me clear idea of this

1410


What is the parameterization? Give one example?

605


Explain the types of properties that quick test learns while recording?

571


How many types of Automation frameworks are there in UFT? Describe them.

567


How will you find the current time of the remote machine using QTP script?

611


Explain step generator in qtp?

664


what is ODC and GDC?

7367


What is recovery scenario manager? When you go for recovery scenario manager? Tell me one scenario were your used recovery scenario in your project?

592