From: Dave S. <dav...@ca...> - 2004-03-30 20:30:44
|
I saw this in the archives but no response so I guess I will ask it again. I am testing an application that uses struts with javascript field required checking when a form is submitted. When the user presses save it checks that all of the required fields and filled in and if not pops up an alert box with the fields that are required. I get the following back trace when running my test. [junit] Testcase: testAddWithoutData took 13.554 sec [junit] Caused an ERROR [junit] The undefined value has no properties. [junit] ======= EXCEPTION START ======== [junit] EcmaError: lineNumber=[123] column=[0] lineSource=[null] name=[ConversionError] sourceName=[/aci/images/static.js] message=[The undefined value has no properties.] errorObject=[ConversionError: The undefined value has no properties.] [junit] com.gargoylesoftware.htmlunit.ScriptException: The undefined value has no properties. [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:250) [junit] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:886) [junit] at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:138) [junit] at com.gargoylesoftware.htmlunit.html.HtmlInput.doClickAction(HtmlInput.java:165) [junit] at com.gargoylesoftware.htmlunit.html.HtmlInput.click(HtmlInput.java:142) [junit] at tests.aci.web.TestShipment.testAddWithoutData(UnknownSource) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [junit] Enclosed exception: [junit] ConversionError: The undefined value has no properties. (/aci/images/static.js; line 123) [junit] at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597) [junit] at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557) [junit] at org.mozilla.javascript.ScriptRuntime.getProp(ScriptRuntime.java:712) [junit] at org.mozilla.javascript.gen.c87.call(/aci/images/static.js:123) [junit] at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1191) [junit] at org.mozilla.javascript.gen.c113.call(Embeddedscript:9) [junit] at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1191) [junit] at org.mozilla.javascript.gen.c119.call(Wrapper definition for onSubmit:1) [junit] at org.mozilla.javascript.optimizer.OptRuntime.callSimple(OptRuntime.java:275) [junit] at org.mozilla.javascript.gen.c121.call(onSubmit:1) [junit] at org.mozilla.javascript.gen.c121.exec(onSubmit) [junit] at org.mozilla.javascript.Context.evaluateReader(Context.java:820) [junit] at org.mozilla.javascript.Context.evaluateString(Context.java:784) [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:242) [junit] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:886) [junit] at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:138) [junit] at com.gargoylesoftware.htmlunit.html.HtmlInput.doClickAction(HtmlInput.java:165) [junit] at com.gargoylesoftware.htmlunit.html.HtmlInput.click(HtmlInput.java:142) [junit] at tests.aci.web.TestShipment.testAddWithoutData(Unknown Source) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [junit] == CALLING JAVASCRIPT == [junit] GargoyleWrapper0() [junit] ======= EXCEPTION END ======== [junit] Testcase: testAddWithoutData [junit] TEST tests.aci.web.TestShipment FAILED -- Dave Smith CANdata Systems Ltd 416-493-9020 |