Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question of looping through the data table
#1
Solved: 10 Years, 9 Months, 3 Weeks ago
hi Ankur and all,

Again one basic question regarding looping through all datatable rows,
I write values 1,2,3,4 in four rows of TCNo column in the Datatable and write the code below.

Code:
Tccount = DataTable.GetSheet("Global").GetRowCount
FormulaVal=DataTable.GetSheet("Global").GetParameter("TCNo").RawValue

For Currentrow=1 to  Tccount
Currentrow=Currentrow+FormulaVal-1

msgbox Currentrow
Next


My question is: In the first run the script goes through the loop 4 times then exits, then again the Variable FormulaVal takes on the value of the next row and For... next loop is executed. How is this possible ? and can you suggest a efficient way of reading the total no. of rows and then looping through for Data driven testing.
Reply


Messages In This Thread
Question of looping through the data table - by sunny rao - 11-17-2008, 03:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with Select checkbox from data table value jayraocourts 0 1,070 11-01-2019, 10:25 PM
Last Post: jayraocourts
  How to get center data value in a odd number of rows and columns web table ... sai rajesh 0 2,620 11-13-2013, 10:24 PM
Last Post: sai rajesh
  DP is not returning the whole table data content soumen 6 4,746 10-02-2013, 12:05 PM
Last Post: vvcyril
  Data table overwrite the value wajahatawan561 2 4,262 06-25-2013, 03:24 PM
Last Post: ssvali
  Script running more times than the values in global data table TPavani 5 4,174 10-04-2012, 11:18 PM
Last Post: krr

Forum Jump:


Users browsing this thread: 1 Guest(s)