Hi all! Been programming forever. Currently develop in Java. New to web/script development. To get to my question, I've taken on a project that requires data entry to load a customer's database with records. I do NOT have access to the new database besides their web interface. This web interface requires several page submits to get all record data entered. I have all the data to be entered in a comma delimited file. Rather than contracting out the data entry I thought it would be simple enough to write something that would load a data record, visit the site, populate fields, click next/submit, complete next page, etc. So my question is: what's the EASIEST (meaning quickest) script/language to code this? I'll either need to read the webpage and parse for entry fields, fill, then submit and do all this stuff, or is there an easier way? Also, is there any place to find code examples of similar projects? Any good sites/references for opensource projects with source code? Thanks you guys! -fp
Do NOT have access to the database? Interesting challenge, but it appears you have a couple solutions in mind: 1. Programmatic data-entry via GET page, parse, submit (GET/POST), etc. 2. Alternate approach. I perform number #1 all of the time as part of the unit testing process, but it can be quite time consuming. I have used the automated web testing tools in Visual Studio to "record" a repeatable scenario. The tests can use various data source as input too. If you do not have access to the above tools, I would try a web macro recorder. I have used a couple in the past for similar tasks, but never for loading a database. Here is one example: http://www.jitbit.com/macrorecorder.aspx. Download a trial and give it a shot.
Thanks for the info. I'll have to check out the web macro recorder. If I can get one to load up a csv file or something with the records needed it could work. Otherwise, I'm looking at some scripting. I found PHP-GTK. Haven't looked much into it as I've been busy. Looks promising. Are there any good places to find good PHP source code samples? To save time and ease the learning curve, I'd like to take existing code that performs similar tasks and modify it for my own needs. Samples of parsing web pages for components then submitting the form via page-required method (i.e. post or get). I did a quick search last week but didn't turn up anything. Didn't spend too much time on it either, though. Thanks again for your thoughts. -fp
If you love Java you'll hate PHP. c# and the free version of visual studio wil be much nearer to the technology you know.
Thanks Free Born John. I'm an MSDN subscriber and have visual studio. Haven't yet had a chance to play around with C# yet. My roots are in C and C++. Started Java development I'd prefer to use something higher level. It would be nice if I could simply provide the address, read the page, parse for form items, fill them, then submit, receive and complete second page, submit. Loop through that umpteen times and I'm golden. I have so many irons in the fire right now I haven't had a chance to search through online examples of source code I can piece together to accomplish this seemingly simple task.