Reputation: 46710
A customer has a legacy web application which is used mainly to capture information. The application has no other interfaces available e.g. web services, API’s.
Typical workflow:
Back end system looks up the amount for this parking fine number.
For various reasons, the customer wants to provide these details via a file. So we would read a record and plug-in the details into the relevant fields as above.
We could capture a work flow via something like Selenium but we would need someway of modifying the “scripts” since the details are different for each record in the file.
We could perhaps send a series of HTTP Posts?
The solution must run in all browsers and the customer doesn’t want to have to install plug-ins etc, on all user PC’s.
No restriction of how to deliver this e.g. we could use Java, C# (preferred) or anything else.
Any suggestions or advice from anyone who has done something like this?
Upvotes: 1
Views: 297
Reputation: 66661
You will want to do this without a browser, using HTTP POST requests. A scripting language such as Perl, Python etc. would be a good choice in terms of simplicity - in this case the actual code would probably take no more than 30-so lines.
You would essentially have to:
then,
<input type="hidden" name="..." value="...">
tags from the POST reply, if anyname=value
pairs read from the POST reply in the step immediately above<input type="hidden" name="..." value="...">
tags from the POST reply, if anyname=value
pairs read from the POST reply in the step immediately aboveYou may also have to instruct your HTTP library not to throw cookies away, if not configured as such by default/already.
Upvotes: 2