|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
error login.clickHi i used this as mentioned in an email before as solution and get the next error.
List<?> list = page.getByXPath("//TD"); HtmlTableDataCell login = (HtmlTableDataCell) list.get(39);//0-based index
HtmlPage page2 = login.click(); System.out.println(page2.getTitleText()); the list of errors as below i deleted a lot of code to get the list short:
this error fires up whe i use login.click above but i am loged is so that works but the next errors wont load the site correctly so that i can't find a lot of other div . at EcmController.main(EcmController.java:70) this referenses to HtmlPage page2 = login.click(); above
15-okt-2009 13:14:18 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error WARNING: CSS error: null [1261:37] Error in declaration. Invalid token "}". Was expecting one of: <S>, ":".
15-okt-2009 13:14:18 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error WARNING: CSS error: null [1261:38] Error in style rule. Invalid token "\r\n". Was expecting one of: <S>, "}", ";".
15-okt-2009 13:14:18 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning WARNING: CSS warning: null [1261:38] Ignoring the following declarations in this rule. 15-okt-2009 13:14:18 com.gargoylesoftware.htmlunit.WebClient printContentIfNecessary
INFO: statusCode=[404] contentType=[text/html] 15-okt-2009 13:14:18 com.gargoylesoftware.htmlunit.WebClient printContentIfNecessary INFO: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /OM7PRD/ltr.css was not found on this server.</p>
<hr> <address>Apache/2.0.63 (Unix) DAV/2 Server at sz0078.kpn.te Port 80</address> </body></html> 15-okt-2009 13:14:18 com.gargoylesoftware.htmlunit.javascript.host.Stylesheet loadStylesheet
SEVERE: 404 Not Found for http://xxxx/OM7PRD/ltr.css changed 15-okt-2009 13:14:19 com.gargoylesoftware.htmlunit.javascript.host.Window jsxFunction_alert
WARNING: window.alert("A JavaScript error is about to occur. If this is a recuring problem, please notify your xxadministrator. Otherwise just click 'Yes' or 'OK' in the next popup to proceed on the next screen.
Error: TypeError: Cannot read property "numLoads" from undefined (script in http://yyyyyfrom (210, 9) to (228, 10)#214) Line: 214 URL: http://yyyyy") no alert handler installed
15-okt-2009 13:14:19 com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine handleJavaScriptException INFO: Caught script exception ======= EXCEPTION START ======== EcmaError: lineNumber=[214] column=[0] lineSource=[null] name=[TypeError] sourceName=[script in http://xxxfrom (210, 9) to (228, 10)] message=[TypeError: Cannot read property "numLoads" from undefined (script in http://xxxxxfrom (210, 9) to (228, 10)#214)]
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "numLoads" from undefined (script in http://szxxx from (210, 9) to (228, 10)#214) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:526)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925)
at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182) at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200)
at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:619) at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1139)
at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:184) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:454)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:330) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:355)
at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:187) at com.gargoylesoftware.htmlunit.javascript.host.html.HTMLFormElement.jsxFunction_submit(HTMLFormElement.java:263)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161) at net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:476)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1688) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) at EcmController.main(EcmController.java:70)
Caused by: net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot read property "numLoads" from undefined (script in http://xxxxxxrom (210, 9) to (228, 10)#214)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3651) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3657) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3676)
... 50 more Enclosed exception: net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot read property "numLoads" from undefined (script in http://sxxxxfrom (210, 9) to (228, 10)#214)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3651) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3657) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3676)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3689) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1371)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1415) at script.bf_incrementLoadCounter(script in http://xxxx from (210, 9) to (228, 10):214)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.evalSpecial(ScriptRuntime.java:2488)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.callSpecial(ScriptRuntime.java:2340) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1554)
at script.bodyevt_runHandlers(http://xxxxxxxxjs/bcb/bodylevel_events.js:80) at script(onload event for HtmlBody[<body marginheight="0" marginwidth="0" onresize="bodyevt_runHandlers(gBodyEvtTypeOnResize,arguments);resizeContentTimeout(100);" onclick="bodyevt_runHandlers(gBodyEvtTypeOnClick,arguments);hideChoice();" onload="window.focus();bodyevt_runHandlers(gBodyEvtTypeOnLoad,arguments);window.name=topWindowName();init();postInit();" onunload="bodyevt_runHandlers(gBodyEvtTypeOnUnLoad,arguments);closeChildrenWindows()" onkeydown="bodyevt_runHandlers(gBodyEvtTypeOnKeyDown,arguments);" onscroll="bodyevt_runHandlers(gBodyEvtTypeOnScroll,arguments);" style="overflow: hidden;">] in http://xxxxx)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:449)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1688) at script(onclick event for HtmlTableDataCell[<td class="IE-NS6-CF_BTN-en-center" style="cursor: pointer; cursor: hand;" onclick="document.forms[0].submit();" width="40">] in http://xxxxxx)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:427) at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:263)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3058) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:449) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:520)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925)
at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182) at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200)
at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:609) at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891) at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1237)
at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1208) at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1177)
at EcmController.main(EcmController.java:70) == CALLING JAVASCRIPT == function () { [native code, arity=0]
} ======= EXCEPTION END ======== Gr, Said ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
|
|
Re: error login.clickHi,
you've hit a JS error. You can choose to ignore it but it may make your test execute wrongly. You can try to simulate an other browser perhaps does it work better. If this error doesn't occur in a "real" brower, then it is a bug. In this case have a look at: http://htmlunit.sourceforge.net/submittingJSBugs.html to see how to report JS errors. Cheers, Marc. s e a écrit : > Hi i used this as mentioned in an email before as solution and get the > next error. > List<?> list = page.getByXPath("//TD"); > HtmlTableDataCell login = (HtmlTableDataCell) list.get(39);//0-based > index > HtmlPage page2 = login.click(); > System.out.println(page2.getTitleText()); > > the list of errors as below i deleted a lot of code to get the list short: > this error fires up whe i use login.click above but i am loged is so > that works > but the next errors wont load the site correctly so that i can't find > a lot of other div . > at EcmController.main(EcmController.java:70) this referenses to > HtmlPage page2 = login.click(); above > > > > 15-okt-2009 13:14:18 > com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: null [1261:37] Error in declaration. Invalid token > "}". Was expecting one of: <S>, ":". > 15-okt-2009 13:14:18 > com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: null [1261:38] Error in style rule. Invalid token > "\r\n". Was expecting one of: <S>, "}", ";". > 15-okt-2009 13:14:18 > com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: null [1261:38] Ignoring the following declarations > in this rule. > 15-okt-2009 13:14:18 com.gargoylesoftware.htmlunit.WebClient > printContentIfNecessary > INFO: statusCode=[404] contentType=[text/html] > 15-okt-2009 13:14:18 com.gargoylesoftware.htmlunit.WebClient > printContentIfNecessary > INFO: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> > <html><head> > <title>404 Not Found</title> > </head><body> > <h1>Not Found</h1> > <p>The requested URL /OM7PRD/ltr.css was not found on this server.</p> > <hr> > <address>Apache/2.0.63 (Unix) DAV/2 Server at sz0078.kpn.te Port > 80</address> > </body></html> > > 15-okt-2009 13:14:18 > com.gargoylesoftware.htmlunit.javascript.host.Stylesheet loadStylesheet > SEVERE: 404 Not Found for http://xxxx/OM7PRD/ltr.css > changed > 15-okt-2009 13:14:19 > com.gargoylesoftware.htmlunit.javascript.host.Window jsxFunction_alert > WARNING: window.alert("A JavaScript error is about to occur. > If this is a recuring problem, please notify your xxadministrator. > Otherwise just click 'Yes' or 'OK' in the next popup to proceed on the > next screen. > Error: TypeError: Cannot read property "numLoads" from undefined > (script in http://yyyyyfrom (210, 9) to (228, 10)#214) > Line: 214 > URL: http://yyyyy") no alert handler installed > 15-okt-2009 13:14:19 > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine > handleJavaScriptException > INFO: Caught script exception > ======= EXCEPTION START ======== > EcmaError: lineNumber=[214] column=[0] lineSource=[null] > name=[TypeError] sourceName=[script in http://xxxfrom (210, 9) to (228, > 10)] message=[TypeError: Cannot read property "numLoads" from undefined > (script in http://xxxxxfrom (210, 9) to (228, 10)#214)] > com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read > property "numLoads" from undefined (script in http://szxxx from (210, 9) > to (228, 10)#214) > at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:526) > at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) > at > net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) > at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925) > at > com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182) > at > com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200) > at > com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:619) > at > com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886) > at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) > at > net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) > at > com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1139) > at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:184) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:454) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:330) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:355) > at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:187) > at > com.gargoylesoftware.htmlunit.javascript.host.html.HTMLFormElement.jsxFunction_submit(HTMLFormElement.java:263) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161) > at > net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:476) > at > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1688) > at > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845) > at > net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) > > at EcmController.main(EcmController.java:70) > Caused by: net.sourceforge.htmlunit.corejs.javascript.EcmaError: > TypeError: Cannot read property "numLoads" from undefined (script in > http://xxxxxxrom (210, 9) to (228, 10)#214) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3651) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3657) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3676) > ... 50 more > Enclosed exception: > net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot > read property "numLoads" from undefined (script in http://sxxxxfrom > (210, 9) to (228, 10)#214) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3651) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3657) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3676) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3689) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1371) > at > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1415) > at script.bf_incrementLoadCounter(script in http://xxxx from (210, 9) to > (228, 10):214) > at script(http://xxxxx/js/bcb/bodylevel_events.js#80(eval):1) > at > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845) > at > net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.evalSpecial(ScriptRuntime.java:2488) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.callSpecial(ScriptRuntime.java:2340) > at > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1554) > at script.bodyevt_runHandlers(http://xxxxxxxxjs/bcb/bodylevel_events.js:80) > at script(onload event for HtmlBody[<body marginheight="0" > marginwidth="0" > onresize="bodyevt_runHandlers(gBodyEvtTypeOnResize,arguments);resizeContentTimeout(100);" > onclick="bodyevt_runHandlers(gBodyEvtTypeOnClick,arguments);hideChoice();" > onload="window.focus();bodyevt_runHandlers(gBodyEvtTypeOnLoad,arguments);window.name > <http://window.name>=topWindowName();init();postInit();" > onunload="bodyevt_runHandlers(gBodyEvtTypeOnUnLoad,arguments);closeChildrenWindows()" > onkeydown="bodyevt_runHandlers(gBodyEvtTypeOnKeyDown,arguments);" > onscroll="bodyevt_runHandlers(gBodyEvtTypeOnScroll,arguments);" > style="overflow: hidden;">] in http://xxxxx) > at > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845) > at > net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) > at > com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80) > at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484) > at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:449) > > at > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1688) > at script(onclick event for HtmlTableDataCell[<td > class="IE-NS6-CF_BTN-en-center" style="cursor: pointer; cursor: hand;" > onclick="document.forms[0].submit();" width="40">] in http://xxxxxx) > at > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845) > at > net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) > at > net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:427) > at > com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:263) > at > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3058) > at > net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162) > at > com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80) > at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484) > at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:449) > at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:520) > at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) > at > net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) > at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925) > at > com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182) > at > com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200) > at > com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:609) > at > com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886) > at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) > at > net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) > at > com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891) > at > com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1237) > at > com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1208) > at > com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1177) > at EcmController.main(EcmController.java:70) > == CALLING JAVASCRIPT == > function () { > [native code, arity=0] > } > > ======= EXCEPTION END ======== > > Gr, > Said > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > > > ------------------------------------------------------------------------ > > _______________________________________________ > Htmlunit-user mailing list > Htmlunit-user@... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
|
|
Re: error login.clickHi,
Thanks for answer. This error ocures only when i use Htmlunit an specialy the xx.click or xx.dbclick() over the page. This happens by al xx.click and yy.click and so on, the list of errors is very large.
But the click event is working i can login etc etc, only i dont trust the results or the response. when i use IE or other browsers this errors don't occure. Is it posible to get rid of this error list.
Or even better is there a solution for this?. 2009/10/16 Marc Guillemot <mguillemot@...> Hi, ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
|
|
Re: error login.clickHi,
the solution is quite simple: fix the incorrect JS evaluation ;-) A step in this direction would be to isolate it to be able to reproduce it with a minimum amount of HTML/JS code. Cheers, Marc. s e a écrit : > Hi, > > Thanks for answer. > This error ocures only when i use Htmlunit an specialy the xx.click or > xx.dbclick() over the page. > This happens by al xx.click and yy.click and so on, the list of errors > is very large. > But the click event is working i can login etc etc, only i dont trust > the results or the response. > > when i use IE or other browsers this errors don't occure. > > Is it posible to get rid of this error list. > Or even better is there a solution for this?. > > > 2009/10/16 Marc Guillemot <mguillemot@... <mailto:mguillemot@...>> > > Hi, > > you've hit a JS error. You can choose to ignore it but it may make your > test execute wrongly. You can try to simulate an other browser perhaps > does it work better. > If this error doesn't occur in a "real" brower, then it is a bug. In > this case have a look at: > http://htmlunit.sourceforge.net/submittingJSBugs.html > to see how to report JS errors. > > Cheers, > Marc. > > s e a écrit : > > Hi i used this as mentioned in an email before as solution and > get the > > next error. > > List<?> list = page.getByXPath("//TD"); > > HtmlTableDataCell login = (HtmlTableDataCell) > list.get(39);//0-based > > index > > HtmlPage page2 = login.click(); > > System.out.println(page2.getTitleText()); > > > > the list of errors as below i deleted a lot of code to get the > list short: > > this error fires up whe i use login.click above but i am loged is so > > that works > > but the next errors wont load the site correctly so that i > can't find > > a lot of other div . > > at EcmController.main(EcmController.java:70) this referenses to > > HtmlPage page2 = login.click(); above > > > > > > > > 15-okt-2009 13:14:18 > > com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > > WARNING: CSS error: null [1261:37] Error in declaration. Invalid > token > > "}". Was expecting one of: <S>, ":". > > 15-okt-2009 13:14:18 > > com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > > WARNING: CSS error: null [1261:38] Error in style rule. Invalid token > > "\r\n". Was expecting one of: <S>, "}", ";". > > 15-okt-2009 13:14:18 > > com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > > WARNING: CSS warning: null [1261:38] Ignoring the following > declarations > > in this rule. > > 15-okt-2009 13:14:18 com.gargoylesoftware.htmlunit.WebClient > > printContentIfNecessary > > INFO: statusCode=[404] contentType=[text/html] > > 15-okt-2009 13:14:18 com.gargoylesoftware.htmlunit.WebClient > > printContentIfNecessary > > INFO: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> > > <html><head> > > <title>404 Not Found</title> > > </head><body> > > <h1>Not Found</h1> > > <p>The requested URL /OM7PRD/ltr.css was not found on this > server.</p> > > <hr> > > <address>Apache/2.0.63 (Unix) DAV/2 Server at sz0078.kpn.te Port > > 80</address> > > </body></html> > > > > 15-okt-2009 13:14:18 > > com.gargoylesoftware.htmlunit.javascript.host.Stylesheet > loadStylesheet > > SEVERE: 404 Not Found for http://xxxx/OM7PRD/ltr.css > > changed > > 15-okt-2009 13:14:19 > > com.gargoylesoftware.htmlunit.javascript.host.Window > jsxFunction_alert > > WARNING: window.alert("A JavaScript error is about to occur. > > If this is a recuring problem, please notify your xxadministrator. > > Otherwise just click 'Yes' or 'OK' in the next popup to proceed > on the > > next screen. > > Error: TypeError: Cannot read property "numLoads" from > undefined > > (script in http://yyyyyfrom (210, 9) to (228, 10)#214) > > Line: 214 > > URL: http://yyyyy") no alert handler installed > > 15-okt-2009 13:14:19 > > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine > > handleJavaScriptException > > INFO: Caught script exception > > ======= EXCEPTION START ======== > > EcmaError: lineNumber=[214] column=[0] lineSource=[null] > > name=[TypeError] sourceName=[script in http://xxxfrom (210, 9) to > (228, > > 10)] message=[TypeError: Cannot read property "numLoads" from > undefined > > (script in http://xxxxxfrom (210, 9) to (228, 10)#214)] > > com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read > > property "numLoads" from undefined (script in http://szxxx from > (210, 9) > > to (228, 10)#214) > > at > > > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:526) > > at > net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) > > at > > > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925) > > at > > > com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182) > > at > > > com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200) > > at > > > com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:619) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886) > > at > net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1139) > > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:184) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:454) > > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:330) > > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:355) > > at > com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:187) > > at > > > com.gargoylesoftware.htmlunit.javascript.host.html.HTMLFormElement.jsxFunction_submit(HTMLFormElement.java:263) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > > at > > > net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161) > > at > > > net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:476) > > at > > > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1688) > > at > > > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845) > > at > > > net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) > > > > at EcmController.main(EcmController.java:70) > > Caused by: net.sourceforge.htmlunit.corejs.javascript.EcmaError: > > TypeError: Cannot read property "numLoads" from undefined (script in > > http://xxxxxxrom (210, 9) to (228, 10)#214) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3651) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3657) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3676) > > ... 50 more > > Enclosed exception: > > net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: > Cannot > > read property "numLoads" from undefined (script in http://sxxxxfrom > > (210, 9) to (228, 10)#214) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3651) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3657) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3676) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3689) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1371) > > at > > > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1415) > > at script.bf_incrementLoadCounter(script in http://xxxx from > (210, 9) to > > (228, 10):214) > > at script(http://xxxxx/js/bcb/bodylevel_events.js#80(eval):1) > > at > > > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845) > > at > > > net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.evalSpecial(ScriptRuntime.java:2488) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.callSpecial(ScriptRuntime.java:2340) > > at > > > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1554) > > at > script.bodyevt_runHandlers(http://xxxxxxxxjs/bcb/bodylevel_events.js:80) > > at script(onload event for HtmlBody[<body marginheight="0" > > marginwidth="0" > > > onresize="bodyevt_runHandlers(gBodyEvtTypeOnResize,arguments);resizeContentTimeout(100);" > > > onclick="bodyevt_runHandlers(gBodyEvtTypeOnClick,arguments);hideChoice();" > > > onload="window.focus();bodyevt_runHandlers(gBodyEvtTypeOnLoad,arguments);window.name > <http://window.name> > > <http://window.name>=topWindowName();init();postInit();" > > > onunload="bodyevt_runHandlers(gBodyEvtTypeOnUnLoad,arguments);closeChildrenWindows()" > > onkeydown="bodyevt_runHandlers(gBodyEvtTypeOnKeyDown,arguments);" > > onscroll="bodyevt_runHandlers(gBodyEvtTypeOnScroll,arguments);" > > style="overflow: hidden;">] in http://xxxxx) > > at > > > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845) > > at > > > net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) > > at > > > com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80) > > at > > > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484) > > at > > > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:449) > > > > at > > > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1688) > > at script(onclick event for HtmlTableDataCell[<td > > class="IE-NS6-CF_BTN-en-center" style="cursor: pointer; cursor: > hand;" > > onclick="document.forms[0].submit();" width="40">] in http://xxxxxx) > > at > > > net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845) > > at > > > net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:427) > > at > > > com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:263) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3058) > > at > > > net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162) > > at > > > com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80) > > at > > > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484) > > at > > > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:449) > > at > > > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:520) > > at > net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) > > at > > > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925) > > at > > > com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182) > > at > > > com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200) > > at > > > com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:609) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886) > > at > net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) > > at > > > net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1237) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1208) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1177) > > at EcmController.main(EcmController.java:70) > > == CALLING JAVASCRIPT == > > function () { > > [native code, arity=0] > > } > > > > ======= EXCEPTION END ======== > > > > Gr, > > Said > > > > > > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
| Free embeddable forum powered by Nabble | Forum Help |