How to overcome the non availability of Exit OR Break function in Tosca
If you are searching for a Exit or Break function/module in Tosca, you would not find one. But there is few way you can overcome this limitation. I am proving just one among them.
You would use a IF statement to overcome this issue. For example, in my working example I have some texts in Excel sheet and trying to verify a text 'abacus' in column One and when it find the text I still dont want to verify the rest of the rows. This will minimize my loop repitition if i have large set of data. I am attaching the tce file and the excel file used along with this discussion.
Counter = 1 WHILE ( Counter < RowCount ) text = Value(Counter) IF text = 'abacus' THEN Buffer(text) Counter = RowCount // This will act as a Exit statement in the loop EndIf Counter++ END WHILE
The word abacus appears on the 12th row excluding the column header. The rest of the rows are ignore and it exits the loop.