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:
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
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:
VB.NET:
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