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

w is datatable

5 Answers   CTS, IBM,


Consider one application is open, clicking one menu will open another application in another browser. QTP does not catch the URL of the second browser(second application). can we capture it ?

0 Answers  


How do u fetch data from a database ?

2 Answers  


How we wil do data driven test using chkpts? Plz. give me complete navigation steps for this?

1 Answers  


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,






What is the difference between CVS and VSS? Are you store QTP SCRIPT In VSS OR CVS? Where you store QTP Script?

1 Answers   Brain Roots, Ordain Solutions,


in QTP, we have options like (record and play,recording modes(normal,analog,low level),object identification,smart identification,object repository,synchronizing test,transactions,checkpoints(std,bitmap,text,text area,DB,XML,accessibility),regular expression,actions,data driving,parameter,parameterization,data tables,recovery scenario(pop up,object state,test run error,application crash). real time users of QTP, pls say and when and at what point u have used all these options ,in ur concerned project.pls give me explanation in accordance with ur real time project handled. real users pls send some time in the aboue case. if u can send the the reply through allinterview or at ref_it_ref@yahoo.co.in

1 Answers  


What is quick test pro? What is a quick test professional?

0 Answers  


There are 3 types of frame works in QTP 1. Linear frame work 2. Modular frame work 3. Key word driven frame work. Can any body explain the above 3 frame work models. y2k_ram2000@yahoo.com

6 Answers   Fidelity, GDS, IBM, TCS, Wipro,


Hi Friends, If you got one Bug , and you are insert that bug in bug tracking tool , and you need to attach SC's (screen shots) also. how to tae SC's , in your organization any separate tools available to take SC's. please provide Ans. its urgent... Thanx in advance

3 Answers  


Do we get any issues if we run the testscript on different browsers? what are the options we need to st in QTP?

2 Answers   BirlaSoft,


Which object model is not supported by QTP? a)COM b)DECOM c)DOM d)DCOM. Pls explain about theese object models?

1 Answers  


Categories