For n=0 to ubound(arrLinkText)
Wait iWaitTime '操作等待
sLinkText = arrLinkText(n) '从链接文字数组中取出链接文字
moveMouseOnIt '调用操作时间函数
Next
Browser("title:="&sTitle).Close '执行完毕关闭浏览器
End Sub
Function moveMouseOnIt()
'检查链接是否存在,存在则触发事件
If Browser("title:="&sTitle).page("title:="&sTitle).link("innertext:="&sLinkText,"index:=0").Exist(iIdentifyTimeOut) Then
Browser("title:="&sTitle).page("title:="&sTitle).link("innertext:="&sLinkText,"index:=0").FireEvent sEventName
moveMouseOnIt = True
Reporter.ReportEvent micPass,sEventName,"Trigger the event """&sEventName&""" successfully."
Else
moveMouseOnIt = False
Reporter.ReportEvent micFail,sEventName,"Fail to trigger the event """&sEventName&""" because of the absence of the link."
End If
End Function作者: skisky 时间: 2008-7-31 11:11
FireEvent事件只针对web对象吧,还有就是鼠标放上去以后qtp如何捕获显示的tip呢?作者: hbycyf123 时间: 2012-9-12 20:30
同问!作者: 秦菲 时间: 2013-3-18 16:00
同问作者: zhangkun90 时间: 2013-3-19 13:48
可以 在qtp11 中 点击 tools-web event recording configuration 中给变成high 试试