VBScript - How to search for a sentence and click that on a webpage?

unclehat

Junior Member
Joined
Oct 18, 2017
Messages
165
Reaction score
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
 
You can do that in multiple ways but try to see what html tag name it has and the number of similar tags that you have in that page.. find child items and click by the index of the tag..

If you want pm me i have many years of experience in similar work and i can help
 
Back
Top