Question Automatic Login Bot

wazuba

Member
Joined
Jul 29, 2009
Messages
7
Programming Experience
Beginner
Hi all,

I wrote an Automatic Login Bot using the webbrowser control.

I wanted to know if there is a way to do this without utilizing a full blown broswer?

This is part of my code:

Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")

If WebBrowser1.DocumentTitle.ToString() = "Login" Then

For Each curElement As HtmlElement In theElementCollection
Dim controlName As String = curElement.GetAttribute("name").ToString
If controlName = "username" Then
' curElement.GetAttribute("Value")
curElement.SetAttribute("Value", "username")
ElseIf controlName = "password" Then
curElement.SetAttribute("Value", "password")
End If
Next

Thanks
 
It's a class excercise, we have to parse specific text from a membership area.
I got it to log in and I can retrieve the text, but it is really slow because it's doing it live on the browser.
 
Back
Top