This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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?