Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VB.NET-Quellcode
-
- Class Form1
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- WebBrowser1.AllowNavigation = True
- WebBrowser1.Navigate("http://speed2.schulterglatze.de/")
- End Sub
- Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
- Dim theElementCollection As HtmlElementCollection
- theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
- For Each curElement As HtmlElement In theElementCollection
- Dim controlName As String = curElement.GetAttribute("name").ToString
- If controlName = "loginname" Then
- curElement.SetAttribute("Value", "MEINNAME")
- ElseIf controlName = "loginpwd" Then
- curElement.SetAttribute("Value", "MEINPASSWORT")
- End If
- Next
- theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
- For Each curElement As HtmlElement In theElementCollection
- WebBrowser1.Document.Forms(0).InvokeMember("submit") '<----- Der Übeltäter xD
- Next
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement