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

How you know that a test case is a regression test case

3065


How to get the particular property value?

614


Explain the concept of object repository and how quicktest professional (qtp) recognises objects?

614


What is clean sweep?

1382


How many types of Automation frameworks are there in UFT? Describe them.

562






How to do call a output parameter from one action to another action??/

1877


When do go for loop condition in test?

659


What is the script for database check point, bitmapchek point, regular expression ?

1559


can any body plz help by sending the qtp docs and qtp ppt's? this is my mail id:murali.padeti@gmail.com

1766


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

1625


What is keyword view?

566


What is QTP testing process?

633


Explain how to use QTP to check broken links on a page?

589


I AM TRYING PORT CODE FROM WINRUNNER TO QTP AND DON'T KNOW TO HOW TO CHECK THE ERRORS. IN WINRUNNER FUNCTION RETURNS EIGHER 0 OR -1 AGAINST WHICH RESULT CAN BE MADE PASS OR FAIL BUT IN QTP I DON'T SEE FUNCTIONS RETURNING ANY VALUE. APPRECIATE IF ANYONE COULD HELP ME CONVERTING FOLLWOING WINRUNNER CODE TO QTP. set_window("Customer Service"); rc = web_obj_get_text("Summary","#2","#4",ssn,""," ",1); if (rc != E_OK) { report_msg("[GetSubscriberSummary] Could Not get subscriber SSN; rc = "&rc); myRC = rc; } else { ssn = StripBlank(ssn); if (DEBUG) report_msg ("[GetSubscriberSummary] SSN: "&ssn); }

1725


How you debug your script?

577