ExitComponent Statement
Description
Exits the current component run.
If the component is not part of a component group, then any remaining component iterations are skipped and the run proceeds to the next component in the test.
If the component is part of a component group, then the entire component group is skipped and the run proceeds to the next component after the component group.
The pass or fail status of the component remains as it was in the step prior to the ExitComponent statement.
Syntax
ExitComponent[(RetVal)]
Argument | Type | Description |
---|---|---|
RetVal | Variant | Optional. The component'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 ExitComponent statement to end the component run 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
ExitComponent
End If
See also:
- CallServiceTest Statement
- CreateObject64 Statement
- DescribeResult Statement
- ExecuteFile Statement
- ExitAction Statement
- ExitActionIteration Statement
- ExitComponent Statement
- ExitComponentIteration Statement
- ExitTest Statement
- ExitTestIteration Statement
- GetLastError Statement
- InvokeApplication Statement
- IsPartialRun Statement
- LoadAndRunAction Statement
- LoadFunctionLibrary Statement
- ManualStep Statement
- Print Statement
- RegisterUserFunc Statement
- RunAPITest Statement
- SetLastError Statement
- UnregisterUserFunc Statement
- Wait Statement