http://www.perlmonks.org?node_id=439082


in reply to How can I test a javascript-enhanced web application on Linux?

I have faced the same problems, and found som half-baked solutions that at least takes me part of the way ...

iOpus (No realtion to iPod, AFAIK) has a scripting-plugin for Internet Explorer (costs 30$, but they provide a 30 day trial download) that lets you record a browsing session. Using these recorded macros (as they call them), you can test a user scenario such as logging on or entering a form. The macros can be called from the command line and return a success value, and can therefore be baked into a Test::More regime. The main drawback is that it is an Internet Invader only solution, and as far as I know, the macros can not be run from other OS'es. From their website it looks like their latest version can be scripted from Perl, but I haven't tried this myself so I don't know if this can help in any way.

Another possible solution is to use MaxQ, which does something similar to iOpus. This one uses a proxy for recording browsing sessions, though. It will therefore not really capture anything javascript, since this is purely client side. MaxQ is open source, written in Java and browser sessions are scriptet with the Java implementation of Python called Jython.

But in the end, perrin is of course right in that you have to test all browsers quirks and weaknesses to verify that your scripts works. I don't know any way to automate this yet, so I really hope someone provides you with a solution. In the meantime, take a look at Peter-Paul Koch's website about browser independent javascripting. Best javascript resource I've found to date ...

Good luck!

pernod
--
Mischief. Mayhem. Soap.