How can I search for a sentence(don't have any ID and don't have any box) and clicks that on webpage? I am trying to automate my website and click on a sentence to open that.
Below is the code I tried.
url = "Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate url
While ie.ReadyState <> 4
WScript.Sleep 100
Wend
For Each a In ie.document.getElementsByTagname("Gmail")
If a.href = "javascript:addToFilter();" Then a.Click
Next
Below is the code I tried.
url = "Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate url
While ie.ReadyState <> 4
WScript.Sleep 100
Wend
For Each a In ie.document.getElementsByTagname("Gmail")
If a.href = "javascript:addToFilter();" Then a.Click
Next