can i read a file that contains web form information?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
dabrain
Newbie
Posts: 2
Joined: Mon May 19, 2014 4:56 pm

can i read a file that contains web form information?

Post by dabrain » Mon May 19, 2014 5:06 pm

Hi, would like to know if your auto web form can read information from a source (excel, csv, database table) and enter the contents into a web form, then traverse to another page, enter more form data, traverse etc... The number of forms may or may not change and the form flow may or may not change depending on what the user selects. This is a real life scenario that SAP or any ecommerce system would need to replicate.

thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: can i read a file that contains web form information?

Post by Marcus Tettmar » Mon May 19, 2014 5:30 pm

Hi,

Reading data from Excel, CSV or SQL data source and inputting it into a web form is a very common scenario.

Code will need to be written or recorded against each type of web form - they're all different - but certainly you can construct logic or make decisions based on the data to determine which forms will be input and what to do ....
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

dabrain
Newbie
Posts: 2
Joined: Mon May 19, 2014 4:56 pm

Re: can i read a file that contains web form information?

Post by dabrain » Fri May 23, 2014 12:13 am

Thanks for the reply. Could you point me to an example? I'm about to sink some $$ into this and I really need to see if in fact it will do what I want it to do. :D

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: can i read a file that contains web form information?

Post by Marcus Tettmar » Fri May 23, 2014 8:57 am

Well a good start would be here:
http://help.mjtnet.com/article/138-tran ... or-web-app

Also look at the sample script "Simple Web Auto Native" which automates searching on Google's Advanced search. That's a web form, and the macro fills in one of the form fields and hits the submit button.

Also look at the IE Element Wizard and this video:
http://help.mjtnet.com/article/154-usin ... ent-wizard

And finally also look at WebRecorder - just play around recording filling some data into a web form. I usually start by recording the form filling sequence in WebRecorder. I almost always need to edit the code a little after, clean it up etc (remove unnecessary clicks) but that usually cuts out the bulk of the work in terms of creating the form filling code.

If a simple generic example is what you are after I've created one that reads data from Excel and fills in a Google Docs web form. I've attached a zip file containing XLSX file and script. Comments in the script should explain how it is working.
xl-to-webform.zip
You'll see the URL of the web form in the script file. See comments at top.

Of course your web form, the steps and sequence to get to it, to navigate around the site, your data and so on is going to be different. That's why personally I find examples limiting. They can only really outline the concepts.

We've written hundreds of scripts which read from Excel (or some other data source) and output to web apps/web forms and/or desktop apps. But almost every single one of these scripts works against a proprietary system or a web form on a corporate intranet or behind a secure log in, and the data is confidential. So I can't show you an example of those. They are too specific and confidential or behind a login. So you wouldn't be able to use them. But the code would include code like I've shown you in the above. Hopefully the above articles and samples help demonstrate the fundamental concepts.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts