Hello,

I'm trying to fill in web forms automatically by using the vb.net webbrowser. I'm using code like the following to fill in the name:

Dim elementsInput As HtmlElementCollection = wb1.Document.GetElementsByTagName("INPUT")
        For Each element As HtmlElement In elementsInput

            If element.Name = "OWNER_NAME" Then
                element.SetAttribute("Value", name)
            End If

        Next

The problem is this solution is not global. It will only work on text boxes with the name "OWNER_NAME". Writing out hundreds of variations for every text input there might be for name would not be very smart. There must be an easier solution?

Any idea how I can write a program that will work on ANY web page, no matter what the names of the text inputs are?

Thanks

>Any idea how I can write a program that will work on ANY web page, no matter what the names of the text inputs are?

Nope. You can't write such a program.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.