我试图点击"下一步"链接在网页中但link.innerHTML无法找到"下一步"
HTML代码如下所示
a href =" queue_monitor.do?task_name = WAITCUST& pager_offset = 250& actionType = next">
下一页
/ A>
当我从网页编辑链接以删除下一行及其工作空间时...
For Each ie In objshell.Windows
If TypeName(ie.Document) = "HTMLDocument" Then
If InStr(ie.Document.Title, "Monitor") Then
ie.Visible = False
ie.Visible = True
Set html = ie.Document
Set ElementCol = html.getElementsByTagName("a")
For Each link In ElementCol
If TRIM(link.innerHTML) = "Next" Then
link.Click
Application.Wait Now + TimeValue("00:00:04")
Application.SendKeys ("^a")
Application.Wait Now + TimeValue("00:00:04")
Application.SendKeys ("^c")
Application.Wait Now + TimeValue("00:00:04")
ThisWorkbook.Sheets("WAITCUST Raw").Range("A10000").End(xlUp).Offset(3, 0).PasteSpecial
Application.Wait Now + TimeValue("00:00:07")
End If
Next link
End If
End If
Next ie
有什么建议吗?