标题: TEST_A脚本调用TEST_B脚本中的可复用ACTION时,弹出“Action was not found.”? [打印本页] 作者: pengminghua 时间: 2008-10-28 23:51 标题: TEST_A脚本调用TEST_B脚本中的可复用ACTION时,弹出“Action was not found.”? 想调用其他脚本中的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.”作者: archonwang 时间: 2008-10-30 14:27
可能的状况是Action位置移动或更名了。作者: lhjtc8257 时间: 2009-8-10 14:20
我也有这个问题??? 作者: zhou840401 时间: 2009-8-11 13:42
qtp用insert a action的时候,肯定会在那个文件记录下这一个action所在的test的路径的,而你自己手工写的,qtp当然会提示找不到了,你让QTP怎么去找这一个呢?作者: mowandao1985 时间: 2010-7-19 10:23
恩,我也遇到了同样的问题,希望高手出来帮忙解决下!作者: yujie6832 时间: 2010-7-19 12:15
路径没了,呵呵,设置下相对路径吧,或者固定你的脚本集在某个文件夹下,不要去动他作者: mowandao1985 时间: 2010-7-19 12:46
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作者: mowandao1985 时间: 2010-7-19 13:34
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