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

孤人 提交于 2019-12-10 21:19:15

问题


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:


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


来源:https://stackoverflow.com/questions/11970531/hp-quicktest-how-do-i-get-http-status-using-quicktest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!