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

.have you ever written compiled module? if yes , tell me about some of the function that you wrote.

1791


Mention what are the different types of recording modes in qtp? Which will be used when?

658


What is difference between run time object and test object?

645


If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?

665


Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.

1720






can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks

1608


How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object

2620


how to evalute defects in QTP script?

1573


i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.

1624


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.

1811


WHAT IS THE DIFFERENCE BETWEEN QTP SCRIPT AND VB SCRIPT? HOW MUCH PERCENTAGE WE USE IN QTP SCRIPT REAL TIME AND HOW MUCH PERCEN OF VB SCRIPT,,,,,,,

1621


What is the extension of the recovery scenario file in qtp?

632


How to Upgrade or support firefox 2.0 version on QTP 9.0? I have installed QTP 9.0 and installed firefox 2.0. But in REcord and Run Settings, it shows firefox 1.5 in Web tab for browser selection.

1894


How will internal and external links be validated and updated? how often?

752


What is qtpro? What is a quick test professional?

679