Fill out web forms with the textbox

Asked

Viewed 339 times

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

1 answer

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.