Menu

#719 Cannot call method "indexOf" of null with Prototype 1.6.0.3

2.3
closed
nobody
None
5
2014-07-04
2008-10-28
Matt Raible
No

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

Discussion

  • Marc Guillemot

    Marc Guillemot - 2008-10-29

    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.

     
  • Marc Guillemot

    Marc Guillemot - 2008-10-30

    Pending for reporter feedback.

     
  • SourceForge Robot

    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).

     

Log in to post a comment.

MongoDB Logo MongoDB