ExitComponentIteration Statement
Description
Exits the current component iteration.
If the component is not part of a component group, then the remaining steps in the component are skipped and the run proceeds to the next component iteration.
If the component is part of a component group, then the remaining steps of the current component and any remaining components in the component group are skipped, and the run proceeds to the next group iteration.
The pass or fail status of the component remains as it was in the step prior to the ExitComponentIteration statement.
Syntax
ExitComponentIteration[(RetVal)]
Argument | Type | Description |
---|---|---|
RetVal | Variant | Optional. The component iteration's return value. The return value is displayed in the run results. Tip: To return a value for use in other components in the business process test, use an output parameter. |

The following example uses the ExitComponentIteration statement to end the current component iteration if a checkpoint on the userName edit box fails.
res = Browser("Welcome: Booking Site").Page("Welcome: Booking Site").WebEdit("userName").Check ( CheckPoint("userName") )
If res = False Then
ExitComponentIteration
End If
See also: