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 –

  1. ' Action "CheckForm"
  2.  
  3. FormVersion = RunAction("GetFormVersion", oneIteration)
  4.  
  5. If FormVersion = 2 Then
  6.  
  7. <a name="wp1657437"></a>
  8.  
  9. Call RunAction("CheckOldForm", oneIteration)
  10.  
  11. <a name="wp1657438"></a>
  12.  
  13. Else
  14.  
  15. <a name="wp1657439"></a>
  16.  
  17. Call RunAction("CheckNewForm", oneIteration)
  18.  
  19. <a name="wp1657440"></a>
  20.  
  21. End If
  22.  
  23. <a name="wp1657441"></a>
  24.  
  25. ' Action "GetFormVersion"
  26.  
  27. <a name="wp1657442"></a>
  28.  
  29. If IsNewForm Then
  30.  
  31. <a name="wp1657443"></a>
  32.  
  33. ExitAction(2)
  34.  
  35. <a name="wp1657444"></a>
  36.  
  37. Else
  38.  
  39. <a name="wp1657445"></a>
  40.  
  41. ExitAction(1)
  42.  
  43. <a name="wp1657446"></a>
  44.  
  45. End If