[2005] - Send Keystroke To WebBrowser Control
Hi All,
I am trying to write a program that will emulate a user clicking on a webpage submit button. I have tried the below code on my website using the names of the two textboxes and submit button but nothing happens in the webbrowser control.
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Document.All("username").SetAttribute("admin", "my login")
WebBrowser1.Document.All("password").SetAttribute("admin", "my password")
WebBrowser1.Document.All("op").InvokeMember("click")
End Sub