QTP的那些事--可重用action(call to existing action)的使用

简介:

参考了下QTP的帮助文档中的飞机订票系统的使用方式。

在被重用的action中设置action properties中的parameters属性,设置输出或者是返回的值。

parameter(“属性值”),即可,返回值也需要采用这种方式即可。

callAction “action名称[action所在的test的名称]”,action中输入参数1,action中输入参数2,…,action中输出参数,例如如下:

 

RunAction "销售日报表查询 [销售日报表]", oneIteration,"BJ-kk123-SH ","ON","ON","","",res
QTP的帮助文档对对于RunAction,说明是有三个参数,第一个参数是需要运行的action的路径,第二个是运行的迭代的次数(对于被运行的action如果参数是datatable的时候可能会用上),第三个参数就是被运行的action运行的输入参数值,parameter的介绍如下:

第一个参数ActionName参数

String

The name of the action.

Note: 在语句中必须要强制赋值给actionname不能使用变量进行设置. Do not use a variable. For example, write: 
RunAction="Action1[ExternalTest]" 
and not:
aName="Action1[ExternalTest]"
RunAction aName

第三个参数Parameters参数:

Variant

Optional.

The values and storage locations for the called action's input and output parameters. Input parameters are listed before output parameters.

For an input parameter, specify either a fixed value or the name of another defined parameter (可以是Data Table 参数, environment 参数, or 一个action中call action properties中的input parameter参数) from which the argument should take its value.

For an output parameter, specify either a variable in which you want to store the value or the name of a defined parameter (Data Table parameter, environment parameter, or an action output parameter of the calling action).

大致就是输入参数需要输入一个特定的值,而对于输出参数只需要指定一个变量赋值即可。在被调用的action中的输入参数或者是输出参数可以使datatable对象,可以使environment对象,可以使action属性中的输出参数属性。

 


本文转自hcy's workbench博客园博客,原文链接:http://www.cnblogs.com/alterhu/archive/2012/03/25/2416726.html ,如需转载请自行联系原作者。
目录
相关文章
Understanding actions:理解动作(Action)
Understanding actions:理解动作(Action)
139 0
Understanding actions:理解动作(Action)
SAP QM 执行事务代码QP01,系统报错 -Material type FOOD is not defined for task list type Q-
SAP QM 执行事务代码QP01,系统报错 -Material type FOOD is not defined for task list type Q-
SAP QM 执行事务代码QP01,系统报错 -Material type FOOD is not defined for task list type Q-
Visual Studio Code 保存代码时报Applying code action Organize Imports
Visual Studio Code 保存代码时报Applying code action Organize Imports
Visual Studio Code 保存代码时报Applying code action Organize Imports
SAP Spartacus user-addresses.effect.ts里发送地址加载成功的action,会触发我们自己的reducer
SAP Spartacus user-addresses.effect.ts里发送地址加载成功的action,会触发我们自己的reducer
73 0
SAP Spartacus user-addresses.effect.ts里发送地址加载成功的action,会触发我们自己的reducer
使用action framework 实现order change时自动发送邮件
Created by Jerry Wang, last modified on May 01, 2014 具体说明可以参考这个blog
使用action framework 实现order change时自动发送邮件
workflow initialization in webclient ui - Remote call case
workflow initialization in webclient ui - Remote call case
workflow initialization in webclient ui - Remote call case
如何使用ABAP code inspector找出所有在LOOP里访问database的操作
如何使用ABAP code inspector找出所有在LOOP里访问database的操作
141 0
Action framework BAdI Definition TRIGGER_EXECUTED
Created by Jerry Wang, last modified on May 28, 2014
145 0
Action framework BAdI Definition TRIGGER_EXECUTED

热门文章

最新文章