how can we retrieve ten rows from the data table using

loop concept?

Answer Posted / baba

hello nanda, sreeprasad answer is correct... if you worked
on datatable. you will change settings in test settings in
run tab as run on one iteration only.

then it will take from 1 row to 10 only once.

but he forgot this


Function rcnt(rowcount)

if (rowcount>10) then

for i=1 to 10 step 1

val=datatable.value("column1",dtGlobalSheet)
print "Value of"& i &"row is : "&val
datatable.setnextrow

Next

else

msgbox "rowcount is less than 10, requiement is not _
satisfied"

End If

End Function

rows=datatable.getsheet("Global").getrowcount
msgbox rows

row_cnt=rcnt(rows)
print row_cnt

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of actions are there in quicktest professional?

518


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); }

1750


am not having intrest in coding lang like c c++ java etc can i choose Testing tools as my carrier and please suggest me which tool is good (suitable for me)

1288


How may types of defects identify application or your currently working application?pls give me answer..

1523


After executing the script in qtp suppose i found some script execute successfully and found some error.So how to report the status for both (i.e pass and fail report)in test director. For "fail" We use "defect tab" in testdirector. But for "pass" how to report it to TL.what is the process plz anybody ans

1689






hi i have 4 yrs exp in manual and automation testing using QTP i need sample resumes plz can u send this mail id pbre1980@gmail.com

1427


Suppose I want fail that check point? How can you do that?

609


1.How do u prepare the test suits in QC? 2.How do u convert requirements to test plan in QC?

1505


Can we create user defined functions in qtp?

566


How to explain a banking project in interview as a test engineer???

2608


Connect to QC using AOM.

1248


Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance

1785


How do you test DLL files using automation Tool QTP?

2743


Explain about business process component? types and usage?

1572


What is the default object synchronization timeout in qtp?

659