However, I still get the following JavaScript error when I try to run a basic login test. Any ideas?:
org.mozilla.javascript.JavaScriptException: java.lang.NullPointerException
at org.mozilla.javascript.JavaScriptException.wrapException(JavaScriptEx
ception.java:70)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:418)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1193)
at org.mozilla.javascript.gen.c82.call(httpunit:13)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2179)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.j
ava:58)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.perform
Event(JavaScript.java:162)
at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(Scriptabl
eDelegate.java:55)
at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:5
78)
at com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaSc
ript.java:419)
at com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80)
at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(J
avaScriptEngineFactory.java:46)
at com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:105)
at com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:2
30)
at com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:4
49)
at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:143)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:1
27)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
at com.dicarta.TestHttpUnit1.testGetHttp1(TestHttpUnit1.java:49)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:166)
at junit.framework.TestCase.runBare(TestCase.java:140)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at junit.textui.TestRunner.doRun(TestRunner.java:74)
at junit.textui.TestRunner.run(TestRunner.java:200)
at com.dicarta.TestHttpUnit1.main(TestHttpUnit1.java:115)
E
Time: 42.21
There was 1 error:
1) testGetHttp1(com.dicarta.TestHttpUnit1)
java.lang.RuntimeException: Event 'resizeFrames();' failed: org.mozilla.javascri
pt.JavaScriptException: java.lang.NullPointerException
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleS
criptException(JavaScript.java:189)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.perform
Event(JavaScript.java:165)
at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(Scriptabl
eDelegate.java:55)
at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:5
78)
at com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaSc
ript.java:419)
at com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80)
at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(J
avaScriptEngineFactory.java:46)
at com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:105)
at com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:2
30)
at com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:4
49)
at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:143)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:1
27)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
at com.dicarta.TestHttpUnit1.testGetHttp1(TestHttpUnit1.java:49)
at com.dicarta.TestHttpUnit1.main(TestHttpUnit1.java:115)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
NOTE: Exact same page works fine with HttpUnit 1.5, as long as I disable throwing ScriptExceptions. Does not work with either 1.5.2 or 1.5.3 (I get above error message). I need at least 1.5.2 because we use <iframe> syntax.
Am I missing something?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to run a basic login test using HttpUnit 1.5.3 with JUnit 3.7, and I'm calling
HttpUnitOptions.setExceptionsThrownOnScriptError( false );
However, I still get the following JavaScript error when I try to run a basic login test. Any ideas?:
org.mozilla.javascript.JavaScriptException: java.lang.NullPointerException
at org.mozilla.javascript.JavaScriptException.wrapException(JavaScriptEx
ception.java:70)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:418)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1193)
at org.mozilla.javascript.gen.c82.call(httpunit:13)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2179)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.j
ava:58)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.perform
Event(JavaScript.java:162)
at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(Scriptabl
eDelegate.java:55)
at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:5
78)
at com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaSc
ript.java:419)
at com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80)
at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(J
avaScriptEngineFactory.java:46)
at com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:105)
at com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:2
30)
at com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:4
49)
at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:143)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:1
27)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
at com.dicarta.TestHttpUnit1.testGetHttp1(TestHttpUnit1.java:49)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:166)
at junit.framework.TestCase.runBare(TestCase.java:140)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at junit.textui.TestRunner.doRun(TestRunner.java:74)
at junit.textui.TestRunner.run(TestRunner.java:200)
at com.dicarta.TestHttpUnit1.main(TestHttpUnit1.java:115)
E
Time: 42.21
There was 1 error:
1) testGetHttp1(com.dicarta.TestHttpUnit1)
java.lang.RuntimeException: Event 'resizeFrames();' failed: org.mozilla.javascri
pt.JavaScriptException: java.lang.NullPointerException
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleS
criptException(JavaScript.java:189)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.perform
Event(JavaScript.java:165)
at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(Scriptabl
eDelegate.java:55)
at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:5
78)
at com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaSc
ript.java:419)
at com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80)
at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(J
avaScriptEngineFactory.java:46)
at com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:105)
at com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:2
30)
at com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:4
49)
at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:143)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:1
27)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
at com.dicarta.TestHttpUnit1.testGetHttp1(TestHttpUnit1.java:49)
at com.dicarta.TestHttpUnit1.main(TestHttpUnit1.java:115)
NOTE: Exact same page works fine with HttpUnit 1.5, as long as I disable throwing ScriptExceptions. Does not work with either 1.5.2 or 1.5.3 (I get above error message). I need at least 1.5.2 because we use <iframe> syntax.
Am I missing something?