How to fill in fields automatically on a web page

For a some time I am searching for a solution to fill in the fields automatically of a web page. I know the id’s of the input boxes, the selection boxes, radiobuttons, etc., but I am not able to fill the fields via the url, because it simply does not accept the variables send via the url.
Does someone know a tool to do this? Does someone know if such problem can be solved with xojo?

This webpage is very old, but uses https and encryption. The only thing I want to do is to make a tool which gathers the info typed, stores it in a database and send the page to the server as it was the real webpage.

Why the database?
The information on the webpage might be stored on the webserver, but it acts like it is a one time action. After the information is entered one can use this info only for the particularly day the person visits and the next day the info is gone and not accessable anymore. It is not even used the next time when the person visits again.
This tool will be replaced, but it will take at least a year for that and in the meantime one wants a tool imitating the webpage, but the data stored in the database will be searched to find if the person has visit once before and will fill in the blancs if he/she did. This will reduce the time dramatically for entering visitors.

My only problem currently is as described above, how can I fill in the fileds or how can i make the webserver think the info receved is from its page?

Just send the content via HTTP POST to the url defined in form action. Of course if no captcha is used. Sometimes an form script accept the content sent in url. Just check the url Tag and send content like this:

Most modern webpages should not accept this but if this an older one you could try to do this.

I tried, but it was not accepted by the server. I am rather new in the website stuff, but what is captcha?

would you post the url with the form?

the url is like: https:/<>/vaf/visits/VisitRequestDetail.aspx?type=1

The code I can send you in private, if you want to take a look at it.

please send an PM I may take a look if there is a quick solution…

If the Form Action did not accept a direct post, it should be possible to use an HTMLViewer and employ JavaScript to set the values and click the send button.

Much more easier, just put everything into HTTP POST and go… no struggle with Javascript, HTML Viewer & Co but need to see the form first.

In case of captcha you cannot post directly. Then the JavaScript option can be used.

oh, ok…thank you for the info. I will first retry the url one and when that still fails I will try the javascript one. i will keep you all posted on the progression. It will take some time, because I am off the coming days :slight_smile:

Hi Tomas, I do not get the fields filled and I think I found also the reason in the html code. In the initialization of the webpage I found ‘autocomplete=off’ and I guess this will also avoid that fields are filled in by URL. Completing the URL with fieldIdFirstName=John&fieldIdLastName=Doe does not work.

I requested the owner of the server for more insight information of the used javascripts. Waiting on his response.

HTMLViewer.ExecuteJavaScript "document.getElementById('username').value='moo'"

replace HTMLViewer with the name of your HTMLViewer
replace username with the name of the field you are trying to fill in
replace ‘moo’ with the data you actually want in the field