for example one window is there, the window contains how
many edit box's i want script? i know the script but that is
not exact answer....
The script is like this ..........

set a=description.creation()
a("Native class")="WinEdit"
b=window("Flight Reservation").childobject(a).count
msgbox b

Answer Posted / softwaretester4u

use this example for windows alos
Step1: Set Objects = Browser("BrowserName").Page
("PageName").ChildObjects

Step2: Objectcount = Objects.count
Linkcount = 0
Step3: For i = 1 to Objectcount-1

Link = Objects(i).GetROProperty("micclass")
If Link = "Link" Then
Linkcount = Linkcount+1
msgbox Linkcount
End If
Next
msgbox Linkcount ' It show total number links

Set oDesc = Description.Create()
oDesc("micclass").Value = "Link"
Set Lists = Browser("Google").Page("Google").ChildObjects
(oDesc)
NumberOfLists = Lists.Count()
linkcnt = 0
For i = 0 To NumberOfLists - 1
linkcnt = linkcnt+1

Next
msgbox linkcnt

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?

1631


in qtp 3 sheets is there in data table like global, action1, action2. I want to check the rows and columns in action2. how can check using script?

6323


Both static and dynamic arrays are handled by the vb script. Is it true?

563


Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?

655


How to remove associated function library?

558






Where is the Bitmap checkpoint information stored?

1764


if numbers are always changing write a script for that

3398


What are the technics follow in writing VB script?

1532


What is the pros and cons between QTP and Rational Robot

3284


HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?

1716


Can U Explain about QTP tool from older version to latest version also its differences?

1516


What is the synchronization point in qtp?

561


what could go wrong with test automation?

1507


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

552


What is action? How many types of actions are there in qtp?

614