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
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