Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Clicking a button with no ID?

I'm trying to click a button on a webpage, but there is no ID so I can't exactly identify it:
Here is the inspect element:
<button title="Show Lat Long converted address on Map" onclick="showlatlong();">Convert to Address</button>

If you want the website, here it is:
http://www.latlong.net/Show-Latitude-Longitude.html

I'm trying to click the "Convert to Address" button using the webbrowser control. Thanks. 🤝
(May 27, 2014 06:10 PM)Drizzy‎‎ Wrote:  I'm trying to click a button on a webpage, but there is no ID so I can't exactly identify it:
Here is the inspect element:
<button title="Show Lat Long converted address on Map" onclick="showlatlong();">Convert to Address</button>

If you want the website, here it is:
http://www.latlong.net/Show-Latitude-Longitude.html

I'm trying to click the "Convert to Address" button using the webbrowser control. Thanks. 🤝

Try:
Code
webbrowser1.Document.GetElementsByTagName("button")
Code
For Each elm As HtmlElement In webBrowser1.Document.All
    If elm.GetAttribute("title") = "Show Lat Long converted address on Map" Then
    elm.InvokeMember("click")
    End If
Next


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by darkdev315Feb 9, 2020 06:54 PM 2 172 Feb 9, 2020 06:54 PM
Last Post: Le-coyote
[.NET] by LeonieHackPetaBytes2Jan 23, 2019 05:10 PM 1 226 Jan 23, 2019 05:10 PM
Last Post: 0xDEAD10CC
[.NET] by Johan CruyffJun 9, 2017 03:39 PM 3 137 Jun 9, 2017 03:39 PM
Last Post: Johan Cruyff