Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FOR LOOP
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
hi,
here is my script. i m using functions.
Code:
On error resume next
Browser_Open()
Login ()
Data_Import()
here i want to give a for loop asking qtp to do this see below code
For i= 1 to RowCount
Datatable.SetCurrentRow(i)
then perform these functions: here i m unable to understand where to give "next"
Variables()
Search_Locations()
Search_Customer()
Create_Customer()
On error GOTO 0
Data_Export()
the "Next" should be here but when i m giving it here it is repeating the same iterations again
Logout()
Browser_Close()

please help

Thanks
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi,

YOu dont have to use for loop if you set the option File->Settings->Run tab. If you set the iteration option to only one row there, loops should be used to work on all rows of DT.
Code:
for i=1 to rowcount
Datatable.SetCurrentRow(i)
'--- Code here
Next
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to exit from a for loop silpavinod 2 9,941 10-17-2012, 12:55 AM
Last Post: agarwl.anurag
  for loop sia sharma 1 3,356 09-13-2012, 11:44 AM
Last Post: ksrikanth2k9
  Help with Loop LJENNE 1 3,206 08-10-2012, 12:32 PM
Last Post: Ankesh
  How to get out of infinite FOR loop... sssidana 3 4,586 07-20-2012, 01:04 AM
Last Post: sree.85
  Not able to Iterate using For Loop tanyamrz 2 3,415 05-22-2012, 09:41 PM
Last Post: tanyamrz

Forum Jump:


Users browsing this thread: 1 Guest(s)