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.QTP-exitaction

Syntax –

ExitAction[(RetVal)]

Example –

' Action "CheckForm"

FormVersion = RunAction("GetFormVersion", oneIteration)

If FormVersion = 2 Then

<a name="wp1657437"></a>

Call RunAction("CheckOldForm", oneIteration)

<a name="wp1657438"></a>

Else

<a name="wp1657439"></a>

Call RunAction("CheckNewForm", oneIteration)

<a name="wp1657440"></a>

End If

<a name="wp1657441"></a>

' Action "GetFormVersion"

<a name="wp1657442"></a>

If IsNewForm Then

<a name="wp1657443"></a>

ExitAction(2)

<a name="wp1657444"></a>

Else

<a name="wp1657445"></a>

ExitAction(1)

<a name="wp1657446"></a>

End If 

If you want to keep track of further articles on UFT (QTP). I recommend you to subscribe by Email and have new UFT articles sent directly to your inbox.

Subscribe to get free updates on UFT!

LearnQTP is the most popular site on UFT (formerly QTP).

Enter your first name and email address below to instantly subscribe and download an eBook on Optimizing UFT Scripts. In future, we will make sure you get new tips & tricks on UFT delivered direct to your email box.

Please check your email and confirm free subscription!