VB2008
I am trying to click a button on a website but its not working for some reason. I've used this code on another site but the html code doesnt look the same.
Here's the HTML Code
<input type="submit" onclick="return fnbValidateLogin()" value="Login" name="Login">
Here's what i Tried
theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
For Each curElement As HtmlElement In theElementCollection
If curElement.GetAttribute("value").Equals("Login") Then
curElement.InvokeMember("onclick")
End If
Next
End Sub
i tried a few combinations, but its not working. Please Help
Thank You