我正在尝试单击链接,但是由于WebTable
.
所以我创建了我的函数库,这是链接的代码,我正在尝试调用它。我用名字fyi。
Call ClickLink ("sign-in")
Sub ClickLink(LinkName)
Set myPage=Browser("title:=.*").Page("title:=.*").Webtable()
Set wLink = description.Create()
wLink("micClass").value="Link"
Set allLinks = myPage.ChildObjects(wLink)
TotalLinks = allLinks.count()
For Iterator = 0 To TotalLinks -1
If allLinks(i).GetRoproperty("name") = LinkName Then
allLinks(i).click
wait(3)
Exit For
ElseIf TotalLinks -1 Then
reporter.ReportEvent micFail, "Find Link", LinkName
End If
Next
Set myPage = Nothing
Set wLink = Nothing
Set allLinks = Nothing
End Sub