Data Driven Loops
They seem easy enough. Read a CSV file (I have done that). The parameters are for only an individual cell and I am not able to get the looping working
here is the script version.
def Loopy():
Check_V = ""
Check_Amt_V = ""
Check_Date_V = ""
Project.Variables.LoopD.Reset()
RecordIdx = 1
while RecordIdx <= 105:
#Derive DataLoop
#Retrieves the Excel cell value and saves it as Last Operation Result.
#LastResult = Excel.Open("C:\\Smartbear\\Documentation\\Formatted Pension.xlsx").SheetByTitle["Pension Formatted"].CellByName["AB1"].Value
#Check_Amt_V = LastResult
#Posts an information message to the test log.
Log.Message(Project.Variables.LoopD, "HappyBirthday")
#Retrieves the Excel cell value and saves it as Last Operation Result.
LastResult1 = Excel.Open("C:\\Smartbear\\Documentation\\Formatted Pension.xlsx").SheetByTitle["Pension Formatted"].CellByName["AB1"].Value
#Derive CheckAmt
Check_Amt_V = LastResult1
#Posts an information message to the test log.
Log.Message(Check_Amt_V, "")
#Derive Payee
#Retrieves the Excel cell value and saves it as Last Operation Result.
LastResult2 = Excel.Open("C:\\Smartbear\\Documentation\\Formatted Pension.xlsx").SheetByTitle["Pension Formatted"].CellByName["A1"].Value
Check_V = LastResult2
#Posts an information message to the test log.
Log.Message(Check_V, "")
#Opens the specified URL in a running instance of the specified browser.
#Browsers.Item[btIExplorer].Navigate("https://qat1.q.pers.state.or.us/Clarety/SANavigator.do?event=R_GO")
#Derive Check Date
#Retrieves the Excel cell value and saves it as Last Operation Result.
LastResult3 = Excel.Open("C:\\Smartbear\\Documentation\\Formatted Pension.xlsx").SheetByTitle["Pension Formatted"].CellByName["AA1"].Value
Check_Date_V = LastResult3
#Posts an information message to the test log.
Log.Message(Check_Date_V, "")
Project.Variables.LoopD.Next()
RecordIdx = RecordIdx + 1
You have the concept, but you're working too hard here
See the Iterating through records section at this link
https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/drivers.html
You'll have one loop that iterates through the records. The driver is only opened and closed once.
As you work with a particular row, you can refer to the cells by column name.