Set objBrowser = description.Create()
objBrowser("micClass").value = "Browser"
Set objPage = description.Create()
objPage("micClass").value = "Page"
Set objLink = description.Create()
objLink("html tag").value = "A"
objLink("text").value = linkName
Dim checkTitle
Browser(objBrowser).Page(objPage).Link(objLink).Click
checkTitle=Browser(objBrowser).Page(objPage).GetROProperty("title")
'验证title,如果checkTitle字符串含有“keyWord”,则表示成功进入某页面
If Instr(checkTitle,keyWord) <> 0 Then
Reporter.ReportEvent micPass,"NavigatePage","Pass"
Else
Reporter.ReportEvent micFail,"NavigatePage","Fail"
End If
Set objBrowser = nothing
Set objPage = nothing
Set objLink = nothing
End Function
Run Error:
Cannot identify the object "[ Link ]" (of class Link). Verify that this object's properties match an object currently displayed in your application.