Hardy
8 years agoOccasional Contributor
how to continue to next Data-Driven loop item on error
Now i am testing a windows application, record the create new customer operation, need to read data from excel and enter the input fields. And i am using the Data Driven Loop to run multiple test cases, TestComplete will stop on error if there exists error, so i want to know how to continue to next Data-Driven Loop item.
I'm not pythonic :) but i just tried
def Main(): Driver = DDT.ExcelDriver("../../../TestBook.xlsx", "TestSheet", True) TestedApps.RunAll() orders = Aliases.Orders mainForm = orders.MainForm while not Driver.EOF(): try: OpenForm() orderForm = orders.OrderForm groupBox = orderForm.Group PopulateForm() Checkpoint() CloseForm() except: Log.Error("An error occurred.") Driver.Next() CloseApplication()
Referred here: