I am running into an issue when running a test using a data file. My data file consists of 5 rows of data. My script has a for loop to read the data -
for (def row = 1; row <= findTestData(‘TestDataSources’).getRowNumbers(); row = (row + 1))
The issue is that after the script reads the first row and completes the test, the web page closes. The loop causes the page to open again to create another record. The focus does go on the first field to enter data. It never reads the data and skips all the fields that should have data written to them from the data file. No errors are generated but the values are never read from the file.
I changed the row variable to ‘2’ to see if it reads the 2nd row. It did read it but then was not able to read the 3rd row in the file when the script looped.
Any idea why the script cannot read any data after reading the row based on the row value?