I am currently on my second day of evaluating QAWP and I have a query regarding DDT and iterating through the reocrds in a datasheet.
I currently have a sheet with 1000 rows of random personal data that I need to use for input on a web page. The first run is fine, but I cannot figure out how to make it move on to the next record when the test script is run again.
I have added the below code which I am using at the moment (which just uses the same row each time):
Code:
Personal_Data = OpenRecordset("Personal Data") 'Open the recordset
NextRow(Personal_Data) 'Increment the "active" row
If Not RecordsetEOF(Personal_Data) Then 'Make sure there is a second record
'Read the data from the recordset
firstName = GetRowValue(Personal_Data, "First_Name")
lastName = GetRowValue(Personal_Data, "Last_Name")
email = GetRowValue(Personal_Data, "Email")
house = GetRowValue(Personal_Data, "House")
street = GetRowValue(Personal_Data, "Street")
city = GetRowValue(Personal_Data, "City")
county = GetRowValue(Personal_Data, "County")
postcode = GetRowValue(Personal_Data, "Post_Code")
phone = GetRowValue(Personal_Data, "Phone_Number")
Else
Fail("Error: the second record does not exist") 'Fail with an error message
End If
I look forward to your input
Thanks