Supported in UFT One versions 2021 and later.
Public Function AddExistingAction( _ ByVal Path As String, _ ByVal ActionPosition As qtActionPosition _ ) As Action
- The full path to the existing action. It could be a local or ALM path.
- Indicates whether the call to the existing action will be added as the first or last step in the test.
Value Description qtAtBegining The beginning of the test. qtAtEnd The end of the test.
- Using this method, you can add the existing action only to the beginning or end of the test.
- You can move the action to another location only by opening the test in the UFT One application and modifying its location manually.
'This example starts UFT One, opens a test, and adds an existing action to the test. ' Create the application object Dim qtApp Set qtApp = CreateObject("QuickTest.Application") 'Start UFT One qtApp.Launch qtApp.Visible = True 'Open a test test1 = "C:\Users\appsadmin\Documents\UFT One\GUITest1" qtApp.Open test1 actionLocation = "C:\Users\appsadmin\Documents\UFT One\GUITest1\Action1" 'Add an existing action at the beginning of the test qtApp.Test.AddExistingAction actionLocation, 1 ' 1 == qtAtBegining ' Add an existing action at the end of the test qtApp.Test.AddExistingAction actionLocation, 2' 2 == qtAtEnd qtApp.Test.Run, true