how can we retrieve ten rows from the data table using
loop concept?
Answers were Sorted based on User's Feedback
Answer / sreeprasad
Assume "Column1" is my column name in the Global Data
table, then use this code:
for i=1 to 10
datatable.setcurrentrow(i)
returnvalue=datatable.value("Column1","Global")
msgbox(returnvalue)
next
| Is This Answer Correct ? | 1 Yes | 1 No |
Hi Sreeprasad..this will take 10 rows..but the loop will
execute no.of times that how many rows in datatable.
If u r using 9.0 or above version..
set app = createobject("quicktest.application")
set qtest = app.test
qtest.settings.run.startiteration = 10
qtest.settings.run.enditeration = 20
this script will execute only 10 rows starts from 10 th row
and ends with 20 th row.
If any queries..
nanda.dreddy@gmail.com
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / 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 |
waht is puirpose of accesbility Check point? waht is the use of Page and XML check points?
How many add-ins comes by default with quicktest professional?
What are main panes available in qtp test browser?
The xls contain data. how to get number of columns form the sheet?
What is the limitations of BVA?
How to enable the text check point in qtp? By default it is disables
1 Answers Sify, ssinformatics,
How to customize checkpoints with parameters?
My project title is "DRUG Audition and research management" it comes which domain?
Where u will use output checkpoint in QTP?
how to select particular value from the combobox in the current page which is entred in the previous page editbox after parameterization?
Explain synchronization types in QTP
Hi Guys, I am very new to QTP tool , In real time environment how to test the application with this tool, 1. How to load application in QTP tool 2. How to write test script in QTP. 3. In manual testing we test login box (user id , password) how can we test this kind of testing with QTP tool with examples . Please guys put some focus on my questions , real time ecperienced answers would be appreciate, advance thanks ,please guys i am expecting ur answers as soon as posible