I'm using jWebUnit 2.0, which now has HtmlUnit support. When I try to test my application with JavaScript enabled, I get the following error message.
======= EXCEPTION START ========
EcmaError: lineNumber=[9] column=[0] lineSource=[<no source="">]</no>
name=[TypeError]
sourceName=[http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js]
message=[TypeError: Cannot call method "indexOf" of null
(http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js#9)]
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot call
method "indexOf" of null
(http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js#9)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:528)
at org.mozilla.javascript.Context.call(Context.java:502)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511)
A similar issue has been reported in jWebUnit's tracker:
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1958470&group_id=61302
Can you provide the url of the page you're testing as well as the actions you perform there and the browser you're simulating? The exception is not enough to find the root of the problem.
Pending for reporter feedback.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 30 days (the time period specified by
the administrator of this Tracker).