A local customer contacted me to solve a repetitive task on his business.
Such task is login on a website (of a provider of him), select some options, and upload until four different file types (The server software of the website upload the files using POST method).
Such task is login on a website (of a provider of him), select some options, and upload until four different file types (The server software of the website upload the files using POST method).
The task must be made lot of times by day, in the moment that each one of the four file types is generated by an internal system.
The customer wanted a program to solve this manual and time consuming task. Then I developed a small piece of software named WebPostAutomation to make this task automatic.
My system is basically a Pharo 1.0 image with WebClient loaded with some adaptations to make upload of files using multipart/form-data through POST method.
WebPostAutomation have a configuration file with the parameters that need to know to make its job.
Also, each operation of WebPostAutomation is logged using a simple log mechanism I developed to this project (The logging engines I found on Squeaksource were so complicated to my current needs). A sample of the log file next:
Being that the customer is using Windows on his daily work, I deployed WebPostAutomation with the latest Pharo VM for Windows, tweaking somethings with the configuration of the vm file.
To inform the result of each upload I parse the HTML returned by the server and log that info.
I know is a simple solution, but also is a clean solution, far better than automate the task using Internet Browser macros (that is the first obvious option).
Using WebPostAutomation is simple and straightforward and the communication is directly with the remote web server with no other pieces of software in the middle.
I wrote this article to show another possibility of make business using our lovely Smalltalk.
Pic Information:
http://www.flickr.com/photos/sepblog/3941048713/ / CC BY 2.0
No hay comentarios.:
Publicar un comentario