How to add action template in QTP?

To every new action, engineers add comments, history details at top of every action. Typing or copy and pasting from existing template might be time-consuming. QTP provides a way to add an action template for the action. If you a specific template, for every action your comments will get added automatically. 

What is Action?

Actions in QTP is a collection of VB script statements in a defined order of business flow. It helps to achieve modularity and reusability. Script can contain any number of actions. There are different types of actions:

[tabs tab1=”Reusable Action” tab2=”Non-Reusable Action” ]
[tab]Reusable Action can be used in other tests any number of times. It saves time and improve efficiency. [/tab]
[tab]Non-Reusable Action cannot be used in other tests. QTP executes non-resuable action only one time in the same script.[/tab]

To add Action Template, follow the below steps: 

  • Go to C:\Program Files\HP\QuickTest Professional\dat
  • Open ActionTemplate.mst in editor
  • Add the text in ActionTemplate.mst and save it. E.g.

‘Name: <script name>

‘Date: <date scripted>

‘Author: <author(s) name>

‘Module: <module name>

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Are you up for a challenge? Click here to take up this Loadzilla challenge and win 500 USD.Challenge Link
+ +
Share via
Copy link