in reply to Automated testing driving me nuts...
For Windows, there is Win32::IE::Mechanize. I'm not aware of an equivalent for Linux, unfortunately.
See also Testing at the browser: a trip report. (Perl, Ruby, etc.).