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

Answers were Sorted based on User's Feedback



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

Answer / prasad.dasagrandhi

iam using QTP 9.2

in a cal appli i have add,sub,mul,div buttons to get the
count i have written this script

but it is showing count is o, can anybody help me


systemutil.Run"C:\Users\Raju\Desktop\cal.exe"
Set desc =Description.Create()
desc("micclass").Value = "Button"
set button=vbwindow("vbname:=CALCULATOR").vbbutton
("vbname:=ADD").ChildObjects(desc)
a= button.count
msgbox (a)

Is This Answer Correct ?    3 Yes 1 No

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

Answer / pvr

systemutil.Run"C:\Users\Raju\Desktop\cal.exe"
Set desc =Description.Create()
desc("micclass").Value = "Button"
set button=vbwindow("vbname:=CALCULATOR").vbbutton
("vbname:=ADD").ChildObjects(desc)
a= button.count()
msgbox (a)

Is This Answer Correct ?    1 Yes 0 No

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

Answer / prakash pandey

set desc=description.create
desc("micclass").value="WinEdit"
set
childobject=browser("google").page("google").childobjects(desc)
msgbox childobject.count

Is This Answer Correct ?    2 Yes 1 No

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

Answer / 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

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

Answer / barani

systemutil.Run"C:\Users\Raju\Desktop\cal.exe"
Set ODesc = Description.Create
ODesc("micclass").value = "Winbutton"
set ChldODesc = Window
("regexpwndtitle:=Calculator").ChildObjects(ODesc)
print ChldODesc.count

Is This Answer Correct ?    1 Yes 0 No

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

Answer / arjuncr

dear raju it is wrong

systemutil.Run"C:\Users\Raju\Desktop\cal.exe"
Set desc =Description.Create()
desc("micclass").Value = "Button"
set button=vbwindow("vbname:=CALCULATOR").vbbutton
("vbname:=ADD").ChildObjects(desc)
a= button.count
msgbox (a)

this one is correct
systemutil.Run"C:\Users\Raju\Desktop\cal.exe"
Set desc =Description.Create
desc("class Name").Value = "Button"
set button=window("regexpwndtitle:=CALCULATOR").ChildObjects
(desc)

msgbox desc.count

Is This Answer Correct ?    1 Yes 0 No

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

Answer / nagk24

cnt=0
Set d=description.Create
d("micclass").value="WinEdit"
Set a=window("text:=Flight Reservation").ChildObjects(d)
For i=0 to a.count-1
cnt=cnt+1

Next
msgbox cnt

Is This Answer Correct ?    1 Yes 1 No

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

Answer / reddy prasad

NAGK24

Pvr

iam not getting the count

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

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

0 Answers  


Hi all, I am New to QTP . I am Now in critical situtaion. I want to know How to create our own object respository for our application. please say the answer with example.

3 Answers  


WHAT IS ETL TESTING.......

2 Answers  


Using QTP checkpoint, where do you store your expected Properties of the object which later compares with the actual properties of the object???

4 Answers  


What is difference between Quality centre and Test Director?

1 Answers   Nokia,






How to remove associated function library?

0 Answers  


Hi all can any one give me roles and responsibilities for QTP (not WINRUNNER)

0 Answers   Autodesk, EDS, Wipro,


What are the details steps to connect a remote mysql database in QTP

1 Answers   Verizon,


Hi , I am new to VBscripting, My requirment is to write a vbscript to read a row (which has coloumns like Description, Code, date(DD/MM/YY), hours etc) and export these feilds to a Website and then click on Submit Automatically on that web page. This it should do for all the Rows in that excel file. Any help is much appriciated Thanks Shalini

2 Answers   TCS,


WHat is Object Identification and Object Spy?

2 Answers   IBM,


There is web page with the webtable,this contains some data, how do you manipulate the data.

2 Answers   Tech Mahindra,


How is GC reddy online program Will i get placed How are the placements.

1 Answers  


Categories