(HP QuickTest) How do I get HTTP status using Quic

2019-07-03 21:50发布

I'm creating an QuickTest script that get all URL's for a page and check if the status of http request where code is 200. But my question is how do I get the http request status code from a URL ?

1条回答
We Are One
2楼-- · 2019-07-03 22:41

This was my solution:

Set Http = CreateObject("Microsoft.XMLHttp")
Set oDesc = Description.Create()
    oDesc("micclass").Value = "Link"
Set EditCollection = Browser("Browser").Page("Page").ChildObjects(oDesc)

URL_TEMP = EditCollection(i).GetROProperty("href")
Http.Open "GET" , URL_TEMP , false
Http.Send
msgbox Http.Status
查看更多
登录 后发表回答