automationScript

How to create Action Template In UFT

Action Template is a mechanism in UFT that allows you to include some text in your new actions by default. The text will be included automatically every time you create a new action. Suppose that for every action you create for your automation suite, you want to include some comments at the beginning of the action. Instead of manually adding it for every action, you can create an Action Template that would automatically add the static text for you. Let us suppose that you want to add the following text in your action –
Let’s see how this can be done –
'=========================================================================
'Action Name –
'Purpose –
'Created by –
'Date –
'Change History
'========================================================================
  1. Open notepad and copy the above code to it.
  2. Save the notepad as ActionTemplate.mst.
  3. Open UFT/QTP’s dat folder. For QTP 11, the path can be: C:\Program Files\HPQuickTest Professional\dat. [Note: The path can change depending upon the OS & QTP version/installation]
  4. Add the ActionTemplate.mst file in the dat folder.
  5. Now whenever you create a new action, you will see the above template pre-printed on top of the editor by default.

Subscribe for updates