| || |
Resolve this... error but how??
below is the script i am trying to execute, but keep getting error, like:
"The retrieve DataTable.Value operation failed. The specified parameter index value: "1" does not exist in the data sheet."
For i = 0 to itemCount step 1
Can anyone please tell me the format for setting the webEdit box so that it reads the first cloumn but second row and so on.
A quick reply would be appreciated
Re: Resolve this... error but how??
Syntax for reading DataTable value is:
Your data should be located in localSheet in order to execute your loop as you want to.
To have data in GlobalSheet doesn't solve this problem, because - in every iteration QTP will peakUp (by default) only one (next) row. Meanning: Global sheet controls number of iterations - how many rows you have there - as much iteration you would have for this TestCase.
In your example: DataTable.value(i+1,1)
you have to provide in first parameter NameOfColumn. Is "i+1" this name?
Second parameter for this function in your script is 1. What do you wanted to implement? Is it row, you want? Here should be name (or number) of sheet. If so - that param. is correct.
Fix first one then.
To capture every next row for next iteration - you need explicitelly SetNextRow at the beginning of your loop. Search this group for solution. YOu will find a lot of codes for this topic.
One of them (SetNextRow is not required for this):