我正在创建一个 QuickTest 脚本来获取页面的所有 URL,并检查代码是否为 200 的 http 请求的状态。但我的问题是如何从 URL 获取 http 请求状态代码?
最佳答案
这是我的解决方案:
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
关于http - (HP QuickTest) 如何使用 QuickTest 获取 HTTP 状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11970531/