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

I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format, if possible, kinldy mail PDF file to my mail-ID: ramakrishna908@gmail.com Regards, krishna.

1467


I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?

1375


what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

1709


Is virtual object supported in low level recording mode?

623


Explain different types of checkpoints?

562






What is the script for database check point, bitmapchek point, regular expression ?

1555


I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?

1853


I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.

1726


Explain different types of action in qtp?

575


What are the various automation frameworks available in qtp?

511


How to create scenario selector

1483


What does it mean when a check point is in red color? What do you do?

568


Where to use Property Let, Property Get, Property Set in UFT

374


what is vmodel?advantages and disadvantages of vmodel?

1616


How to record a qtp script ?

562