QTP的Action模板

在QTP的安装目录,例如C:/Program Files/HP/QuickTest Professional/dat,创建一个名为ActionTemplate.mst的文件,文件中写模板内容,例如:
' -----------------------------------------------------------
' Author:
' Create Date:
' Revision:
' -----------------------------------------------------------

 

保存后,启动QTP,这样每次创建的Action都会包含模板中的内容。

除了在模板中写注释头信息外,还可以把一些每个Action都需要加载的函数或语句都写上,例如写入ExecuteFile语句加载VBS文件。

If you want to include one or more statements in every new action in your test, you can create an action template. For example, if you always enter your name as the author of an action, you can add this comment line to your action template. An action template applies only to actions created on your computer.

To create an action template:

Create a text file containing the comments, function calls, and other statements that you want to include in your action template. The text file must be in the structure and format used in the Expert View.
Save the text file as ActionTemplate.mst in your <QuickTest Installation Folder>/dat folder. All new actions you create contain the script lines from the action template.
Note: Only the file name ActionTemplate.mst is recognized as an action template.

 

你可能感兴趣的:(function,File,action,include,Comments,structure)