In this article, we will learn all about Action Template in UFT. Where are they used? and Why are they used in UFT?

Say you want to include a piece of text every time you insert a new action. This piece of text can be VBScript statements or a part of documentation information like the date when the test was created, variables that are used by the test, history to maintain log of all the changes etc. Something like what is shown in image below:

action-template

UFT One/QTP does not provide any GUI controlled way to include a piece of text in every new action.  However there is a roundabout way of doing this. Micro Focus calls it Action Template.

  1. Go to <dat> folder inside UFT One/QTP installation <UFT installation>\dat folder.  Normally it can be found under C:\Program Files\Mercury Interactive\QuickTest Professional\dat for versions of QTP below 11 and under C:\Program Files (x86)\Micro Focus\Unified Functional Testing\dat for UFT 11.0 or above.
  2. Inside <dat> folder, create a file by the name ActionTemplate.mst Open it in notepad and include the information you would like to see whenever a new action is created.
  3. Done. Insert a new action in UFT/QTP and see it working!

Do share your comments below if this has helped you increase productivity in UFT One/QTP.

If you like this quick tip and want more, do consider joining our renowned UFT training program.