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 is the use of Testing framework in Automated testing..what are different kinds of Testing frameworks available in Automated testing...

1 Answers   IBM,


Suppose Object name was changed in the application in the second build.I have just modified the name in the Object repository as changes in the Application. Is it possible to accure changes in the script accordingly? If so Suppose I am calling the script through function, Will the changes affect in the script(which is in the function)automatically? If not affected, tell me the solution,How to handle this. How should I change the object property name while using functions

4 Answers   Livetek,


What is the difference between the keyword view and expert view?

0 Answers  


How QTP recognizes Objects in AUT?

1 Answers   Crea,


when we right click on the desktop of any operating system we find a menu , consisting of refresh,edit,open,paste and cut etc... how to load the object and object properties of that menu in QTP

3 Answers   iFlex,






Explain qtp(quick test professional)?

0 Answers  


How you can find the absolute value of the number in qtp?

0 Answers  


Without integrating QC/Testdirector with QTP, is it possible to keep track of the defects?If yes how? How to export QTP results to an excel sheet?

0 Answers  


Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to use descriptive.create ()

6 Answers   IBM,


anybody give me the real time example for descriptive programming of web application

7 Answers  


Can you give me the code to calculate the total number of Links using the child object in the web page..? is there any other way to calculate number of links with out using the Child objects.??

2 Answers   DST Global Solutions,


WHICH functionalities of QTP used in Banking project?

2 Answers   Tarang, Wipro,


Categories