A web Page has a webtable with four columns and four rows.
The first column is of ID and has values of 100,100A,A100,100y
Find out the number of rows whose ID starts with 100.

Similarly the last column is 'number of links'. Each row in
the last column has values like link1,link2,link3 etc
Find out the number of links where id is 100

Answer Posted / sagar jadhav

set objWT = Browser("micclass:=Browser").Page
("micclass:=Page").Webtable("html id:=xxxx")

rowCount = objWT.Rowcount
Dim Pass
For i = 2 to objWT 'As row#1 is always a column
num = objWT.GetCellData(i,1)
numCheck = mid(num,1,3)
If strComp(numCheck, "100", 1) = 0 Then
Pass = Pass + 1
End If
Next

msgbox "Number of expected Rows:" &Pass

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the pros and cons between QTP and Rational Robot

3276


Can you write a script to check if the folder exists or not?

507


i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.

1525


What is action split and the purpose of using this in qtp?

529


How qtp recognizes the object?

663






What are the views available in quicktest professional (qtp)?

565


can u please explain what is the exact difference between qtp8.2 and 9.0

1675


Where we can use the synchronization?

567


Suggest and Define a solution for an application whose objects are not recognized by UFT?

660


Can we record an application running on a remote machine using qtp?

713


How to check bitmap output value?

621


What is qtpro? What is a quick test professional?

577


What is text/text area checkpoint?

560


What is the default add-ins in qtp?

550


How to use parameterization in qtp?

616