51Testing软件测试论坛

标题: QTP为什么回放不了Frame里的WebRadioGroup。select [打印本页]

作者: KEVINCHAN    时间: 2011-3-2 14:19
标题: QTP为什么回放不了Frame里的WebRadioGroup。select
QTP录制时:
Browser("x信息系统").Page("x信息系统").Frame("mainFrame_2").Image("lookup_button").Click
Browser("X信息系统").Page("X信息系统").Frame("_eos_modal_dialog0.32094571360").WebRadioGroup("WebRadioGroup").Select "#4"
Browser("X信息系统").Page("X信息系统").Frame("_eos_modal_dialog0.32094571360").WebButton("选择").Click

上面的操作是
1.在系统页面上,点击一个增加信息按钮,弹出一个窗口;
2.然后在窗口里有几条信息可以选择,信息前面是radio,选其中一个;
3.再按【选择】按钮回到页面上。
为什么到这里回放不了?????请教大侠们啊
作者: KEVINCHAN    时间: 2011-3-2 14:22
错误信息是:
Cannot identify the specified item of the WebRadioGroup object. Confirm that the specified item is included in the object's item collection.
作者: 今天有雾    时间: 2011-3-2 15:28
报错信息,指你的对像识别不了,一建议你做个断点,或是step by step,单独调试一下脚本,二来可能是你的WebRadioGroup 对像有动态的识别属性,你最好spy 一下看看
作者: KEVINCHAN    时间: 2011-3-2 18:31
报错信息,指你的对像识别不了,一建议你做个断点,或是step by step,单独调试一下脚本,二来可能是你的We ...
今天有雾 发表于 2011-3-2 15:28


开发那边说,弹出窗口是用一控件来实现的,JSP里面的一段代码类似于:
<script>
var eos_rowradio = new rowRadio("group1_1");
with(eos_rowradio){
params = [{name:'dictid',value:'01'},{name:'dictname',value:'市政'}];
isChecked = false;
selectStyle = "eos-table-selectrow";
groupid = "group1";
rowEvent = "click";
showRadio = true;
tagName = "tr";
init();}
</script>
作者: tonyliu12    时间: 2011-3-16 00:56
我知道什么问题。 哈哈
select 后面如果用index, index 是从0开始的, 我怀疑只有4个button, 所以#4是不存在的, 改成#3就可以了, 试一下, 有问题再问我
作者: lyscser    时间: 2011-3-16 10:15
报错信息,指你的对像识别不了,一建议你做个断点,或是step by step,单独调试一下脚本,二来可能是你的We ...
今天有雾 发表于 2011-3-2 15:28



找不到对应的选项,不是对象不识别……




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2