There are a bunch of Firefox plugins that claim to handle browser automation. My task is pretty simple, so this should be a nice test:
- Pop a number x from a predefined array of numbers. If the array is empty, stop.
- Plug x into the form.
- Submit the form.
- The web site will send back a pipe-delimited text file. Save that under the name x.txt.
- Go back to 1.
Here's what I tried:
CoScripter by IBM Research. Includes record function! Nice use of natural language. But it can't interact with browser chrome. Plonk. (Also: deleting a command is counterintuitive: you have to backspace all over it, rather than right-clicking and picking "delete" or similar.)
ChickenFoot by Michael Bolin from csail. No record function, but it has a tempting write() function. Unfortunately, the server sends the file as
Content-Disposition: attachment; filename="filename.txt"
...which forces Firefox to pop up the "You have chosen to open" dialog box no matter what and grays out the "Do this automatically from now on" check box, so you have to sit there and click. Not cool. This is a firefox problem, not a ChickenFoot problem.
Eh. I fired up Wireshark, copy-pasted the cookie, and used Python to automate the fetch. That worked.