|
4#
楼主 |
发表于 2012-4-9 09:01:19
|
只看该作者
帖子审核了一天多,我都忘了还有这帖子了...
多谢三楼提醒!我知道错在哪里了
二楼的注意很不错,我稍微做了一点修改,这下能用了:
webElementCheck "logo\.jpg", "Image", "file name"
public function webElementCheck(objText, objType, roProp)
dim ob, obj,i
Set ob = Description.Create()
ob("micclass").value = objType
'ob("html tag").value = "SPAN"
set obj = Browser("title:=.*").Page("title:=.*").childobjects(ob)
For i = 0 to obj.count-1' step xx
'msgbox obj(i).GetROProperty("name")
if StrComp(obj(i).GetROProperty(roProp), objText, 0) then
blnFlag = true
Exit for
else
blnFlag = false
end if
next
If blnFlag Then
reporter.ReportEvent micPass, "Check " + objType + ": " + objText, "assed"
else
reporter.ReportEvent micfail, "Check " + objType + ": " + objText, "Failed"
End If
end function
谢谢两位! |
|