|
跪求结果,QTP用httpwatch组件获取页面状态,返回的总是0,明明想要的是200,哭了我。哪位大侠帮帮忙
Dim url,linkStatue
url="www.baidu.com"
Set control = CreateObject("HttpWatch.Controller")
Set plugin =control.IE.New()
plugin.log.EnableFilter(false)
plugin.Clear()
plugin.GotoURL(url)
wait 2
plugin.Record()
Browser("百度一下,你就知道").Page("百度一下,你就知道").Link("新 闻").Click
control.Wait plugin,-1
plugin.Stop
Set status= plugin.log.Entries.Item(0)
linkStatue =status.StatusCode
If 400>linkStatue Then
Reporter.ReportEvent micPass,"返回码正确","返回码为"&linkStatue
else
Reporter.ReportEvent micFail,"返回码错误","返回码为"&linkStatue
End If |
|