Menu

problem in getting response from javascript

hitesh
2004-11-26
2013-04-26
  • hitesh

    hitesh - 2004-11-26

    I am trying to click on login link and getting the following exceptions:

    org.mozilla.javascript.EcmaError: TypeError: Cannot read property "js_done_loading" from undefined (httpunit#11(eval)#1)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3240)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3230)
        at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3246)
        at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3265)
        at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3278)
        at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1319)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2744)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
        at org.mozilla.javascript.ScriptRuntime.evalSpecial(ScriptRuntime.java:2217)
        at org.mozilla.javascript.ScriptRuntime.callSpecial(ScriptRuntime.java:2071)
        at org.mozilla.javascript.optimizer.OptRuntime.callSpecial(OptRuntime.java:155)
        at org.mozilla.javascript.gen.c4._c2(httpunit:11)
        at org.mozilla.javascript.gen.c4.call(httpunit)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:3026)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:304)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2769)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2145)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
        at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:149)
        at org.mozilla.javascript.Context.evaluateString(Context.java:1220)
        at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.evaluateScriptExpression(JavaScript.java:186)
        at com.meterware.httpunit.scripting.ScriptableDelegate.evaluateExpression(ScriptableDelegate.java:74)
        at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:167)
        at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:128)
        at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
        at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:110)
        at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:253)
        at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:232)
        at com.meterware.httpunit.WebLink.click(WebLink.java:98)
        at Test_Scalix.test_scalix_SWA(Test_Scalix.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        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:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at junit.textui.TestRunner.doRun(TestRunner.java:116)
        at junit.textui.TestRunner.doRun(TestRunner.java:109)
        at junit.textui.TestRunner.run(TestRunner.java:72)
        at Test_Scalix.main(Test.java:13)
    Exception: com.meterware.httpunit.ScriptException: URL failed: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "js_done_loading" from undefined (httpunit#11(eval)#1)

    I tried to bypass exception but it does'nt logged in.
    is there any workaround to this problem.

     
    • Max Wilson

      Max Wilson - 2004-11-26

      Well, "undefined" is what a JavaScript function returns when there is no explicit return value. HTTPUnit also returns "undefined" from a Window.Open event processing JavaScript instead of a link. I'm not sure what js_done_loading is, except that it's a native JavaScript function.

      So, it might be a bug in your HTML, or browser-dependent HTML. Paste some source code or a URL.

      Max Wilson

       

Log in to post a comment.

Monday.com Logo