Reputation: 1
<input type="submit" class="btn">
I can't seem to make it click on it using vb.net. Any help would be appreciated.
Upvotes: 0
Views: 7864
Reputation: 579
You can simply use
WebBrowser.Document.GetElementById("btn").InvokeMember("Click")
Upvotes: 1
Reputation: 5101
Are you using the .NET WebBrowser control? If so, try something like...
For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("input")
If element.GetAttribute("class") = "btn" Then
element.InvokeMember("click")
End If
Next
Upvotes: 2