Share

HtmlUnit

Tracker: Bugs

5 Cannot call method "indexOf" of null with Prototype 1.6.0.3 - ID: 2205557
Last Update: Comment added ( sf-robot )

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>]
name=[TypeError]
sourceName=[http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototyp
e.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$HtmlUnitContextAc
tion.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


Matt Raible ( mraible ) - 2008-10-28 22:02

5

Closed

None

Nobody/Anonymous

None

2.3

Public


Comments ( 3 )

Date: 2008-11-30 02:20
Sender: sf-robotSourceForge.net Site Admin

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


Date: 2008-10-30 09:31
Sender: mguillemProject Admin

Pending for reporter feedback.


Date: 2008-10-29 08:16
Sender: mguillemProject Admin

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.


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Pending 2008-11-30 02:20 sf-robot
close_date 2008-10-30 09:31 2008-11-30 02:20 sf-robot
status_id Open 2008-10-30 09:31 mguillem
close_date - 2008-10-30 09:31 mguillem