0
我需要點擊網頁中的按鈕,但網頁中有多個具有相同屬性的元素,我的代碼顯示錯誤消息。按鈕點擊使用vba拋出錯誤
在跟蹤和錯誤的基礎上,我試圖點擊每一個元素一個一個,即使我無法得到所需的東西。
請找我下面
Set objIE = CreateObject("InternetExplorer.Application")
With objIE
.Visible = True
.navigate "http://www.cargurus.com/"
Do While .busy Or _
.readyState <> 4
DoEvents
Loop
Set what = .document.getElementsByName("zip")
what.Item(0).Value = "606061"
Set Search = .document.getElementByClass("btn btn-warning")'Here i need to find the button and click using.
Search.Item(0).click ' I tried to iterate different values up to 4
End With