I said that it would be desirable for
some JavaScript to execute from the context of something
WWW::Mechanize-like. For thorough testing I eventually came around and thought that the browser itself has to be scripted since it is an integral part of the application being tested. If you are running this on a Win32 machine then you would use whatever COM hooks are required to drive Internet Explorer and then whatever else is appropriate for the other browsers.