51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2316|回复: 3
打印 上一主题 下一主题

[原创] 调用action,能否只用代码实现,望赐教!

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2006-10-9 17:05:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
在action1中调用action2,
我想请问的是  在expert view中只用代码实现调用action (RunAction "调用模块名", allIterations)似乎不能够实现,
而是一定要在keyword view中insert call to existing action添加调用的action,
我是想通过一个主控的action,在外部sheet中表中将需要调用的action参数化,
但是有这样手动操作的话就不能实现全部的自动化,请问能够只用代码就能实现么?

谢谢各位

[ 本帖最后由 photo_liu 于 2006-10-9 17:14 编辑 ]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2006-10-10 09:07:56 | 只看该作者
RunAction "new order", oneIteration

这样调用不可以吗?
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2006-10-10 09:29:59 | 只看该作者
QTP关于RunAction的帮助。有一段注意的事项:

Note: Before you can use the RunAction statement in the Expert View for an external action, you must first call or copy the external action into your test by choosing Insert > Copy of Action or Call to Action. If the external action does not exist in your test, the RunAction statement is not recognized. For more information on copying or calling external actions, refer to the QuickTest User's Guide.


要在EV里面用 RunAction "Action[Test1]", oneIteration 这个语句,在此之前是需要调用外部的Action,就是:
Insert >  Call to Copy ofAction
Insert >  Call to Existing Action


如果不做上面的操作,RunAction没法识别哪个Action才是你想要调用的sdlkfj2
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2006-10-10 09:53:31 | 只看该作者
楼上的正解,
所以我想请教的是能不能不用外部调用而直接用其他语句调用action
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-9-23 15:34 , Processed in 0.070603 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表