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
What is the pros and cons between QTP and Rational Robot
Can you write a script to check if the folder exists or not?
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.
What is action split and the purpose of using this in qtp?
How qtp recognizes the object?
What are the views available in quicktest professional (qtp)?
can u please explain what is the exact difference between qtp8.2 and 9.0
Where we can use the synchronization?
Suggest and Define a solution for an application whose objects are not recognized by UFT?
Can we record an application running on a remote machine using qtp?
How to check bitmap output value?
What is qtpro? What is a quick test professional?
What is text/text area checkpoint?
What is the default add-ins in qtp?
How to use parameterization in qtp?