AddExistingAction Method
Supported in versions 2021 and later.
Description
Adds a call to an existing action from the current test.
Syntax
Visual Basic |
---|
Public Function AddExistingAction( _ ByVal Path As String, _ ByVal ActionPosition As qtActionPosition _ ) As Action |
Parameters
- Path
- The full path to the existing action. It could be a local or ALM path.
- ActionPosition
- Indicates whether to add the call to the existing action as the first or last step in the test.
Value Description qtAtBegining The beginning of the test. qtAtEnd The end of the test.
Remarks
- 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 OpenText Functional Testing application and modifying its location manually.
Example
'This example starts OpenText Functional Testing, opens a test, and adds an existing action to the test. ' Create the application object Dim qtApp Set qtApp = CreateObject("QuickTest.Application") 'Start OpenText Functional Testing 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
See Also