如何編寫代碼點擊該按鈕「Catálogo」?點擊按鈕
按鈕和HTML程序代碼映像:
到目前爲止我的代碼:
'This will load a webpage in IE
Dim i As Long
Dim URL As String
Dim IE As Object
Dim objElement As Object
Dim objCollection As Object
'Create InternetExplorer Object
Set IE = CreateObject("InternetExplorer.Application")
'Set IE.Visible = True to make IE visible, or False for IE to run in the background
IE.Visible = True
'Define URL
URL = "https://www.wix.com/my-account/sites/0761466b-a270-4ab2-a3b3-e7498df11329/app/1380b703-ce81-ff05-f115-39571d94dfcd?referralInfo=DA_Wix%20Stores"
'Navigate to URL
IE.navigate URL
' Statusbar let's user know website is loading
Application.StatusBar = URL & " is loading. Please wait..."
' Wait while IE loading...
'IE ReadyState = 4 signifies the webpage has loaded (the first loop is set to avoid inadvertently skipping over the second loop)
Do While IE.readyState = 4: DoEvents: Loop 'Do While
Do Until IE.readyState = 4: DoEvents: Loop 'Do Until
'Webpage Loaded
Application.StatusBar = URL & " Loaded"
'Unload IE
Set objElement = Nothing
Set objCollection = Nothing
'Click on desired button
With IE.document
Set elems = .getElementsByTagName(" ")
elems.Click
End With
標籤名稱爲空白,因爲我嘗試過很多事情,沒有他們的工作。
是你的問題,你不知道要傳入'getElementsByTagName'什麼?或者是其他東西?請澄清你的問題。 –