how to get the object count ?????????
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
can we install qtp in windows vista
Qtp Automation Engineer , Can he login in VSS? What purpose he login In VSS? But Some companys are using CVS AND VSS ? some are Have log in in VSS Some Not login(not accessing) into VSS, not login persons are working on CVS? my doubt is, can Qtp automation engineer have loin in VSS or not? Where he store QTp Script?
How to handle Dynamically changing Objects in QTP?
1 Folders in VSS 2 In navigation script there are 100 script i want to run first 50 and 37th script also not needed to run how to do this 3 What is navigation script,Driver script, business script what we are loaded in this script 4 use of resource tab 5 Difference between verification and validation give real scenario example 6 file scripting object when to use it 7 what are the problems you are faced while testing web application 8 difference between expert view and keyword view 9 difference between QTP 8.2 and QTP 9.2 navigation frame work please answer these questions from real time working people as early as possible
How to suppress warnings from the test results page?
Hi All, I Want To excute scripts batch without using QC .I need code for that Thanks Balaji
hen do start automation testing after manual testing
How can we fill data in a text box without recording using object spy. Can you please provide the steps...
Hi i want to export the data from applicatioon to excel and later i want to import and use it for my scripts hoe can i do this?
What are the differences between qtp and winrunner?
what is the Exact Meaning of Environment Variables?
How to import excel sheet to QC?