51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2664|回复: 7
打印 上一主题 下一主题

[原创] TEST_A脚本调用TEST_B脚本中的可复用ACTION时,弹出“Action was not found.”?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2008-10-28 23:51:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
想调用其他脚本中的ACTION时,只有通过QTP的INSERT菜单进行操作,才不会出问题!而直接COPY然后再编辑脚本是会出问题的。
如上概述,对不对呀? 问题有什么方法解决不?

例如:
如下3行为【Test1028TOP】TEST脚本中某ACTION中的Expert View内容:
RunAction "第3个ACTION [Test10283]", oneIteration
RunAction "1 [Test10281]", oneIteration
RunAction "第4个ACTION [Test10283]", oneIteration
注:
1、Test10283、Test10281、Test1028TOP为同一个文件夹中的不同名称TEST脚本
2、第1行是我通过QTP的INSERT菜单操作后结果;而第2、3行,都是我直接COPY上行,然后编辑完成的。
可是上面运行结果:
第1行:OK
第2和第3行:都是提示“Action was not found.”
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情
    奋斗
    2018-2-28 18:04
  • 签到天数: 40 天

    连续签到: 1 天

    [LV.5]测试团长

    2#
    发表于 2008-10-30 14:27:43 | 只看该作者
    可能的状况是Action位置移动或更名了。
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    3#
    发表于 2009-8-10 14:20:29 | 只看该作者
    我也有这个问题???
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    4#
    发表于 2009-8-11 13:42:32 | 只看该作者
    qtp用insert a action的时候,肯定会在那个文件记录下这一个action所在的test的路径的,而你自己手工写的,qtp当然会提示找不到了,你让QTP怎么去找这一个呢?
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    5#
    发表于 2010-7-19 10:23:33 | 只看该作者
    恩,我也遇到了同样的问题,希望高手出来帮忙解决下!
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    6#
    发表于 2010-7-19 12:15:45 | 只看该作者
    路径没了,呵呵,设置下相对路径吧,或者固定你的脚本集在某个文件夹下,不要去动他
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    7#
    发表于 2010-7-19 12:46:56 | 只看该作者
    QTP帮助文档
    Note: The RunAction statement can run only actions that are already associated with your test as part of the test flow. Therefore, in order to enter a RunAction statement in the Expert View for an external action, you must first insert a call to the action (Insert > Call to Action) or copy the external action (Insert > Copy of Action) into your test. Using this option associates the action with the test and also inserts a RunAction statement for you. After the the external action is added to the test flow, you can add additional calls to that external action in the Expert View.

    If you insert a RunAction statement in the Expert View for an external action that is not already associated with your test as a part of the test flow, the RunAction statement fails. For more information on copying or calling external actions, see the HP QuickTest Professional User Guide.

    调用的Action必须关联到Test中,成为Test的部分脚本,所以,只能通过insert exsting acton或Copy来调用Action。
    If you insert a RunAction statement in the Expert View for an external action that is not already associated with your test as a part of the test flow, the RunAction statement fails
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    8#
    发表于 2010-7-19 13:34:44 | 只看该作者
    QTP帮助文档
    Note: The RunAction statement can run only actions that are already associated with your test as part of the test flow. Therefore, in order to enter a RunAction statement in the Expert View for an external action, you must first insert a call to the action (Insert > Call to Action) or copy the external action (Insert > Copy of Action) into your test. Using this option associates the action with the test and also inserts a RunAction statement for you. After the the external action is added to the test flow, you can add additional calls to that external action in the Expert View.

    If you insert a RunAction statement in the Expert View for an external action that is not already associated with your test as a part of the test flow, the RunAction statement fails. For more information on copying or calling external actions, see the HP QuickTest Professional User Guide.

    调用的Action必须关联到Test中,成为Test的部分脚本,所以,只能通过insert exsting acton或Copy来调用Action。
    If you insert a RunAction statement in the Expert View for an external action that is not already associated with your test as a part of the test flow, the RunAction statement fails
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-6-25 05:34 , Processed in 0.073763 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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