文章多数来自互联网,若有冒犯的地方,请朋友们说明下,我会及时删除该文章!
QTP关键技术(六) - 嵌套Action间的参数传递
上一篇 /
下一篇 2011-06-21 13:04:40
/ 个人分类:21天QTP突破
参数传递思路:
将Action1的输入参数InAction1传递给Action2的输入参数InAction2,
将Action2的输出参数OutAction2传递给Action1的输出参数OutAction1。
1)创建两个Action,嵌套关系,在关键字视图,拖动Action2到Action1下面有缩进的地方
2)右键Action1,选Action Properties,
在Input Parameters中添加参数InAction1,
在Output Parameters中添加参数OutAction1,点OK
3)右键Action2,选Action Properties,
在Input Parameters中添加参数InAction2,
在Output Parameters中添加参数OutAction2,点OK
4)在Action1和Action2间建立关联
右键Action2,选Action Call Properties,弹出Action Call Properties窗口;
选中InAction2的Value,弹出Value Configuration Options窗口;
在Parameter中共有四项可供选择,选择Test/Action parameter,
在Parent action parameters的parameter中选择Action1
同理,OutAction2的Store In值为OutAction1
以上的操作就是把输入值 通过Action1的输入参数,传递给Action2的输入参数进行使用,
然后Action2运行后,将输出参数通过Action1的输出参数传递出去。
这里只是对嵌套Action进行最基本的讲解,在实际使用当中还要灵活运用。
收藏
举报
TAG: