I'm doing a login system, when I click the start button it starts the following code:
Function Prencher2()
Dim line() As String
Dim emailsenha As String = List.Lines(0)
line = Split(emailsenha, "|")
Me.WebBrowser1.Document.GetElementById("liubw-user").SetAttribute("value", line(0))
Me.WebBrowser1.Document.GetElementById("liubw-password").SetAttribute("value", line(1))
Me.WebBrowser1.Document.GetElementById("liubw-submit").InvokeMember("click")
WaitForPageLoad()
Verificar()
End Function
NOTE: List is the name of the textbox
In case it will put the email and password that is in the textbox and will click the enter button.
I'm using the Function method because it's much faster to do what I want, but in the emailsenha As String = List.Lines(0)
part it gives the System.IndexOutOfRangeException error: 'The index was outside the bounds of the array.'
What can I do to fix this? All my codes are correct because I already tested them manually.