Hey. I am trying to make a small Google Adwords keyword planner tool which incorporates clicking the download button. ( http://i.imgur.com/M3Ksotz.png )

However, it's a bit difficult to figure out how can I programmatically click that button because it's not a usual <input> HTML button, but it's code looks like this:

<span class="aw-toolbelt-downloadButton spGWB spHWB aw-toolbelt-downloadButton spGWB spHWB-hover">Download</span>

I tried Googling but I didn't find anything helpful. The closest I found is..

ie.div(:id, "buttontoclick").fireEvent("onmouseup")

..but I am unsure how can I use it

Any help appreciated.


Member Avatar


Click a button on Google Adwords with VB.NET?


Why can't you used C# or ASP.net to do that? Why VB? I am very curious why you are doing that? Javascript/jQuery would be another option.

use this thing:

For Each el as HtmlElement In   Webbrowser.Document.GetElementByTagName("span")
    If el.InnerText.Equals("Download") Then
        Exit For
    End If