I'm using a web site that has a form with an input field and a submit button. I have many values that I would like to input to this site using this form and find entering them one at a time very tedious. I would like to automate the input to the HTML form as much as possible. So far I have three programming solutions:
1) Proxy server - this program intercepts the incoming html and changes it to preload the next value to be submitted. After the page has loaded in the browser with the field in the form filled in, I press the submit button and wait for the next preloaded page to arrive. I continue pressing submit after each preload until all the data has been submitted. I have this code mostly working.
2) Robot inputter - After loading the form into the browser, this program would be initialized to know where the input field is and where the submit button is. On pressing its DoIt button, it would get the next line to be submitted, write it to the input field and press the form's submit button. I would wait until the form is loaded then press the Robot program's DoIt button to do it again. This would require the user to watch and wait until the HTML page has been loaded and is ready to receive input. Is the Java Robot class capable of doing this?
Are there other ways of doing this?
Joined: Jan 29, 2003
Can you take the browser out of the picture entirely? Using URL and HttpURLConnection you can post anything you like with just Java.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Author and all-around good cowpoke
Joined: Mar 22, 2000