What does the ExitComponent Iteration function do in QTP automation testing using QTP : It simply 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)]
Example
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: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Check ( CheckPoint("userName") )
If res = False Then
ExitComponentIteration
End If
Post a Comment