Retrieve Action Properties
Source code
'************************************************************************************************************************
'Description:
'
'This example opens a test, retrieves and action by its index, and retrieves
'the description for a specified action.
'
'Assumptions:
'There is no unsaved test currently open in UFT.
'For more information, see the example for the Test.SaveAs method.
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable

' Open UFT
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Launch UFT
qtApp.Visible = True ' Set UFT to be visible

qtApp.Open "C:\Tests\Test1", False, False ' Open a test

' Get the first action in the test by index (start from 1)
MsgBox qtApp.Test.Actions(1).Name

' Get the description of a specified action
MsgBox qtApp.Test.Actions("Action1").Description

'Close UFT
qtApp.Quit ' Quit UFT

Set qtApp = Nothing ' Release the Application object