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 |
How to handle dynamic objects in quicktest professional?
in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?
Consider one application is open, clicking one menu will open another application in another browser. QTP does not catch the URL of the second browser(second application). can we capture it ?
What is log file? what is the use of Log fine. How to create? what are the contents and the main advantages of log files. plz do help me in this concepts as i have an interivew on qtp in a couple of days. plz do help me.. thanks in Advance.
How to import the Test Results in QTP to an Excel sheet
what are pretesting activities
How do u write script in qtp? where do u write?
write script for , launching fr window,login and create 5 elements array and store 5 order numbers inthat array? and open order by using order no.s in array and find out maximum tickets booked by which order?
What is the architecture of framework
Explain the types of object repository?
what is vss and cvs what is main difference b/w these two
Hi All, I have QTP installed on my machine but the application under test is on remote machine. I need to automate the scenarios which consist of automatically enter the remote machine through IP address ,record the application in remote machine and run it also when played. Can some one tell how to record the application in remote machine.