|
6#
楼主 |
发表于 2004-12-15 01:09:14
|
只看该作者
按你说的执行是失败的
Sub Main
Dim Result As Integer
dim i as integer
dim y as integer
y = 2
i = 1
'Initially Recorded: 2004-12-13 20:07:03
'Script Name: test
Window SetContext, "Class=TMainForm", ""
PushButton Click, "ObjectIndex=3"
PopupMenuIDSelect 110
'验证正常在线图片
Result = PushButtonVP (CompareImage, "ObjectIndex=3", "VP=head"&i&";Wait=2,2")
Window ResetTestContext, "", ""
PushButton Click, "ObjectIndex=3"
PopupMenuIDSelect 117
'验证离开状态图片
Result = PushButtonVP (CompareImage, "ObjectIndex=3", "VP=head"&y&";Wait=2,2")
Window ResetTestContext, "", ""
End Sub
如果验证点用上边这种格式,脚本编译不过,提示:
test.rec(22) Error: Variable 'i' type conflict
test.rec(33) Error: Variable 'y' type conflict
如果验证点改成:
Result = PushButtonVP (CompareImage, "ObjectIndex=3", "VP=head&i&;Wait=2,2")
Window ResetTestContext, "", ""
log是这么报的
Failure: Description Unable to load baseline image file
Script VP Name: head&i&
Script VP Type:Window Image
Actual Results File
testtagin.head&i&.actYPRB.img
Additional Information PushButtonVP
CompareImage,"ObjectIn dex=3","VP=head&i&;Wai
t=2,2"
Additional Output test.head&i&.actYPRB.img
robot现在没找到验证点文件,变量也没有得到值
我们之所以要这么做是因为要比对的图片较多,但都是同样大小规格一样,美中图片再不同状态下分别有三种图片状态,人工比对的话会很耗时间,所以才想用循环验证点的方法
斑竹告诉我可以实现,但怎样才算成功?或者sqabasic根本不支持,那我就放弃了,这块还是老老实实人工监测 |
|