ExitAction Statement
Description
Exits the current action, regardless of its local (action) iteration attributes. The pass or fail status of the action remains as it was in the step prior to the ExitAction statement.
Note: The ExitAction statement and its return value are displayed in the Run Results.
Syntax
ExitAction[(RetVal)]
Argument | Type | Description |
---|---|---|
RetVal | Variant | Optional. The action's return value. The value can be a string or number, but it must be a constant value. It cannot be the name of a variable. The value is returned to the statement that called the action. |
In the following example, the CheckForm action calls the GetFormVersion action. The GetFormVersion action checks whether the form is in the new version or the old version. If IsNewForm is True, then the action uses the ExitAction function to return the value 2. If IsNewForm is False, then the action uses the ExitAction function to return the value 1. The CheckForm action stores the value returned by the ExitAction statement in the FormVersion variable, and uses it in the following steps.
' Action "CheckForm"
FormVersion = RunAction("GetFormVersion", oneIteration)
If FormVersion = 2 Then
Call RunAction("CheckOldForm", oneIteration)
Else
Call RunAction("CheckNewForm", oneIteration)
End If
' Action "GetFormVersion"
If IsNewForm Then
ExitAction(2)
Else
ExitAction(1)
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