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

Is it possible to change the name of a test object. I mean when we are recording the script for an object (for Ex: Username is a text field which has value "Babu",i am recording that). Then the Name of the object will become "Babu" in object repository. If i want to change "babu" as "xxxxx" .. is it possible to do? Pls help me in this .. if you didn't understand the question, pls let me know.

4 Answers  


Tell me the situations where we will use Data Driven?

2 Answers  


What is the vb script when the url enter into the browser

2 Answers   Satyam,


How do you test the different ads displayed in the Inbox home page of Yahoo. Once u login Yahoo mail, in inbox page there will a banner, where different ads are scrolling, how do you test that using qtp?

2 Answers  


How to save your test using quicktest professional?

0 Answers  






how can we compare descriptive programing with a regular expression

0 Answers  


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

0 Answers  


what is verification & validation?

2 Answers   Accenture, TCS,


What is creation time property and how does it work?

1 Answers  


how do u get lib files into scripting files?

4 Answers  


Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?

0 Answers   ADP, CTS,


Is manual Testing replacement of automation testing?Which types of testing we can not do in automation testing but can do in manual testing?

1 Answers   Hewitt, Wipro,


Categories