From: Parham, C. <cp...@bi...> - 2015-08-08 01:46:41
|
Hi Ahmed, Debugging the code, I have a call stack that is only two levels deep. I’ve taken browser screenshots of the code at fileupload.js#403 (where HTMLUnit says “e” is undefined) and another screenshot of the code calling fileupload from jquery.js#547. The jquery code passes “arguments” as the parameter to fileupload.js. So I’m assuming that “arguments” is for some reason undefined when running HTMLUnit test. Why, I don’t know. Can you suggest something? Thank you. [cid:image001.png@01D0D15A.671007B0] [cid:image002.png@01D0D15A.671007B0] From: Ahmed Ashour [mailto:asa...@ya...] Sent: Thursday, August 06, 2015 6:36 PM To: htm...@li... Subject: Re: [Htmlunit-user] RichFaces 4 fileUpload Hi, You can use "alert(arguments.callee.caller);" Please read some hints in http://htmlunit.sourceforge.net/submittingJSBugs.html#JavaScript_hints Ahmed ________________________________ From: "Parham, Clinton" <cp...@bi...<mailto:cp...@bi...>> To: "htm...@li...<mailto:htm...@li...>" <htm...@li...<mailto:htm...@li...>> Sent: Thursday, August 6, 2015 10:41 PM Subject: [Htmlunit-user] RichFaces 4 fileUpload [Boxbe]<https://www.boxbe.com/overview>[http://www.boxbe.com/stfopen?tc_serial=22212599162&tc_rand=861515138&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001]This message is eligible for Automatic Cleanup! (cp...@bi...<mailto:cp...@bi...>) Add cleanup rule<https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Ftoken%3DIi8%252Bnk7qFall%252FMp1olc8mcL75eB22CTSOdEWLX%252F%252FOUWTlbWYsL0PJc7Riu6FXd37Sgx4PpTi8UqREKNrbwunkj6KPoZym5Nl14m%252BETSxLFUc%252BfKFMFPbKHMTQb8Viuqrs2Zl1nL2D8mSI20ANfPxtw%253D%253D%26key%3DV8qrOxzB48Po5biHytbO8smpjSAQyzonFfA97xlaZs8%253D&tc_serial=22212599162&tc_rand=861515138&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001> | More info<http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc_serial=22212599162&tc_rand=861515138&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001> Hello, I continue to struggle to get the RichFaces fileUpload component to work with HTMLUnit 2.18. (http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=fileUpload&skin=blueSky) After setting the file to upload with htmlInput.setValueAttribute and clicking the Upload button, I get this error from HTMLUnit: 2015-08-06 15:23:58,744 INFO main [com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine][handleJavaScriptException] Caught script exception ======= EXCEPTION START ======== EcmaError: lineNumber=[403] column=[0] lineSource=[null] name=[TypeError] sourceName=[https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js] message=[TypeError: Cannot read property "target" from undefined (https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js#403)] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "target" from undefined (https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js#403) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:865) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628) … == CALLING JAVASCRIPT == function () { return fn.apply(context || this, args.concat(slice.call(arguments))); } ======= EXCEPTION END ======== I’ve tried debugging and all that I can tell is that “e” is undefined on this line #403 in fileupload.js: switch (e.target.status) { The function in fileupload.js is called from jquery.js but I cannot trace the argument to better understand why it’s undefined when HTMLUnit is running. I’ve attached a testcase. Any suggestions? Thanks, Clint ________________________________ The contents contained herein may contain confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or action taken on the contents is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete this message. ------------------------------------------------------------------------------ _______________________________________________ Htmlunit-user mailing list Htm...@li...<mailto:Htm...@li...> https://lists.sourceforge.net/lists/listinfo/htmlunit-user ________________________________ The contents contained herein may contain confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or action taken on the contents is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete this message. |