If your answer is yes, then please read on.
You can accomplish this through Action Templates.
Let me present a very simple example to clear this. You want to get your name as the Author of the Action in every new test which means on opening a new test, your name would be displayed by default.
A sample template would be like:
'***********************************************************************
'@Author:
'@Name:
'@Description:
'***********************************************************************
You will notice that above shown template is fully commented out. Also, the Action Template applies to all the actions created on your own computer.
Now lets see how do we create an Action Template inside HP Quicktest Professional(QTP).
Creating Action Template inside HP QTP:
Open the notepad application and copy the above mentioned code inside the notepad. Save the file with this name “ActionTemplate.mst”. Please take care of adding the double quotes while saving the file in the Save as dialog box. Navigate to the path where your Quicktest Professional software is installed. Search for a “dat” folder inside it and save the above mentioned file inside the “dat” folder.
The hierarchy would be
After saving this file all new actions would contain the script lines from the Action Template saved just now.
Note that only the name “ActionTemplate.mst” would be recognized as an action template. It means if you change the file name to “ActionTemplate1.mst”, it would not work.
Read more...