huang zuxing blog @ home the quieter you become, the more you are able to hear.


Auto login a web interface and auto fill form

Very sad to say, in our department, a boss comes out an "idea" to force us to fill a form every week, in which you need to tell him how you spend your time. If too late to fill the form, a warning letter would come from VP!

After a few weeks, this is very annoyed as we keep filling the same thing every time.

We need an auto script to finish this task. below is a simple method.

Use lynx !!

1. record down what you need to do: login, fill form, save, logout

lynx -accept_all_cookies -cmd_log ./record_info

2. auto repeat what every you type and what ever info you fill in, create

lynx -accept_all_cookies -cmd_script ./record_info

To verify the result, you could manually login and check the form info.

Put command into crontab, let it do the same task for you every friday 1am.

1 1 * * 5 /xxx/xxx/

As you type in your password during login, please keep file ./record_info into a "safe" location.

Related Post

Tagged as: , Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.