RemoveAction Method

Supported in versions 23.4 and later.

Description

Removes a call to a specified action from the current action.

Syntax

Visual Basic
Public Function RemoveAction( _
   ByVal ActionName As String, _
)

Parameters

ActionName

The name of the action called from the current action.

Remarks

This method is valid only for GUI tests.

Example

Removing a call to a specified action from the current action

Copy code
Dim qtApp
Dim test1
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = true    
test1 = "C:\allMethods\AOM\_Resources\Tests\GUITest1"
qtApp.Open test1
'Find the action by index (1 means the first action in the test) and remove Action1 from the first action
qtApp.Test.Actions(1).RemoveAction("Action1")
'Find the Action1 action by name and remove Action2 from Action1 
qtApp.Test.Actions("Action1").RemoveAction("Action2")
qtApp.Quit

See Also

Action Object