Fill a web form with data from a file

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
surferdude

Fill a web form with data from a file

Post by surferdude » Tue Aug 03, 2004 3:41 am

Could I get some clues how to complete a web page form with data from a (probably delimited) file? I thought there were some examples of this but I couldn't find any :( I know how to open and focus on the page, I'm assuming I can tab between fields, but I'm missing how to read and output the values.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Aug 03, 2004 4:44 am

Here's a few things to get you started.....

This is a small section from the HELP in Macro Scheduler for HTTPRequest.
This demonstrates a POST operation, sending name=value pairs to the page:

Let>PostData=email=[email protected]&name=Joe Bloggs
HTTPRequest>http://www.someplace.com/someform.html, ... MLResponse
In the HTTPRequest line, the value of "PostData" is actually the variable %PostData% that was defined in the previous LET> line. If you have a delimited file with values, then you could make a loop to read a line at a time to build the PostData variable with matching value names.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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