unclehat
Junior Member
- Oct 18, 2017
- 165
- 28
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.
url = "www.google.com"
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
url = "www.google.com"
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