tokyokukeyi 2008-7-16 06:29
QTP cannot identify object
在SwfWindow(“A”)中有个SwfListView(“B”)
SwfListView(“B”)有多条记录和4个columns,单击记录的前面的3个columns,只是选中记录,如果click最后一个column,则不仅选中记录,该记录的的第4个column变成了SwfEdit(“C”),
Record 的时候自动产生:
SwfWindow(“A”). SwfEdit(“C”).Set”111”
如果不click最后一个column,在QTP中record的时候就无法识别
SwfEdit(“C”):SwfWindow(“A”). SwfEdit(“C”).Set”111”
出错:
Cannot identify the object " C " (of class SwfEdit).
试过了n中方法:
Define virtual object
Modify the recording mode
Locate the column4’s position
都不行
该如何解决,请各位大侠帮帮忙啊!这个问题困扰了小妹很久了。
[[i] 本帖最后由 tokyokukeyi 于 2008-7-16 06:33 编辑 [/i]]
studping 2008-7-23 21:41
你在script中加一个判断试试:
wait(1)
if SwfWindow(“A”). SwfEdit(“C”).exist(10) then
SwfEdit(“C”):SwfWindow(“A”). SwfEdit(“C”).Set”111”
Else
SwfWindow(“A”). syne
End if
陈能技 2008-7-24 10:19
这是由于开发人员把ListView控件的EditLabel属性设置为True了。
如果录制有问题,可以直接写脚本:
SwfWindow(“A”).SwfListView(“B”).Select "111"