1
I’m trying to import information from a textbox to auto-fill forms on a website, but visual studio 2013 always returns the error:
"An unhandled Exception of type 'System.Nullreferenceexception' occurred in teste.exe"
"Additional information: Undefined object reference for an object instance."
Example:
Private Sub Commandbutton1_Click(sender As System.Object, e As System.EventArgs) Handles Commandbutton1.Click
Dim Procurar As String
Procurar = Me.textbox1.Text
Me.WebBrowser1.Navigate("www.google.com")
Me.WebBrowser1.Document.GetElementById("lst-ib").InnerText = Procurar
Me.WebBrowser1.Document.All("btnK").InvokeMember("Submit")
End Sub