希望这里能成为我工作成长过程的积累。。

Action之间参数传递

上一篇 / 下一篇  2007-08-26 00:47:48 / 个人分类:QuickTest Pro

转载自(红霞小洼的空间)】

Action之间的参数传递
例如:在Action1中,有如下代码:
out_str="This is out_string"
RunAction "Action2",oneIteration,out_str
在Acton2中,在其step->Action Properties中的,input参数栏,加入out_str后,
msgbox(parameter("out_str")),就能正确显示参数了 

按照该方法如下:

1.加入Action1后,输入:out_str="This is out_string"
RunAction "Action2",oneIteration,out_str

2.然后再加入Action2,注意:Action1和Action2是并列关系,

在其step->Action Properties中的,input参数栏,加入out_str后,

这是在Action2中输入:msgbox(parameter("out_str"))

当运行的时候会出现两个msgbox,其中第一个显示内容为:"This is out_string" ;第二个msgbox显示内容为:空;

当把和Action1并列的那个Action2去掉后就可以出现一个msgbox,其中显示内容为:"This is out_string",

结论: Action1和Action2为父子关系时,才会出现传递的参数内容。


TAG:

 

评分:0

我来说两句

日历

« 2024-05-13  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 8576
  • 日志数: 15
  • 建立时间: 2007-06-10
  • 更新时间: 2008-07-23

RSS订阅

Open Toolbar