I am working on a UFT script that reads the values from a global data sheet and inputs the value to a textbox and then performs a verification. But the script reads only the first value and not the rest of the values in the column (and runs the same value 6 times). I know I am missing something basic but can't put my finger on it; can you please help?
length (data table)
-100
200
100.01
0
100
25
Here is the code:
<opens the number dialog>
data_length = DataTable.GetRowCount 'returns 6
for i=1 To data_length
swfWindow("main_client").SwfWindow("tallyDialog").WinEdit("Current Value: -000.00).Set DataTable.Value("length") 'expecting it to read and input first value.
swfWindow("main_client").SwfWindow("tallyDialog").ActiveX("Enter") 'click enter
avg_length = swfWindow("main_client").SwfWindow("tallyDialog").Check (Checkpoint("Value must be from 0 to 100))
If avg_length then
reporter.reportEvent micPass, "test passed"
Else
reporter.reportEvent micFail, "test failed"
End if
Next
I was expecting it to do this iteration for all 6 values in the length table but it is doing this iteration 6 times for the first value (-100) What am I missing?
changing "run on all rows" to "run only one iteration" in the UFT settings also did not work.