WebBrowser1.Document.GetElementById("txtLogon").SetAttribute("value", TextBox1.Text)
WebBrowser1.Document.GetElementById("txtPassword").SetAttribute("value", TextBox2.Text)
Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In allelements
If webpageelement.GetAttribute("id") = "btnLogon" Then
webpageelement.InvokeMember("click")
End If
Next
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate("http://login.yahoo.com/")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
WebBrowser1.Document.GetElementById("login").SetAttribute("value", TextBox1.Text)
WebBrowser1.Document.GetElementById("passwd").SetAttribute("value", TextBox2.Text)
WebBrowser1.Document.GetElementById(".save").InvokeMember("click")
End Sub
End Class