From: Erskine, C. <chr...@ed...> - 2005-01-14 20:17:05
|
Since there is not enough detail to show what is failing, I would try stripping pieces of code out until you can find the JavaScript which is failing. What are you doing with HtmlUnit code? Is this to run some automated testing? Chris Erskine EDS Consulting Services Colorado Springs, CO Phone: 719-265-5962 > -----Original Message----- > From: htm...@li... [mailto:htmlunit-user- > ad...@li...] On Behalf Of Lodge, Gary > Sent: Friday, January 14, 2005 11:36 AM > To: 'htm...@li...' > Subject: [Htmlunit-user] Re: javascript Verify error? > > I think Brad was right because I downloaded the htmlunit source, mavened > the > hell out of it and got it to update all the jars and such. This allowed my > tests to get past the first page, but now they're failing with this block > of > javascript Any ideas? (JDK 1.4.1, can't run out of websphere, can't > disable > javascript beacuse this app is huge--200+ pages times several clients--and > it's dependent on JS): > > BTW: onloadfunctions does some funky stuph: > window.onload = function(){setTimeout("onloadcalls()",1)}; > > function onloadcalls(){ > eval(onloadfunctions) > pageLoaded = true; > } > > > > var onloadfunctions = "" > var pageLoaded = false; > > > var limit="30:00" > if (document.images) > { > var parselimit=limit.split(":") > parselimit=parselimit[0]*60+parselimit[1]*1 > } > > onloadfunctions += "setFocusScript();loadRows();begintimer();" > > function newWindowFunction(menuId,link) > { > > window.open("http://rodan:8080/msx_br_lodgeg/servlet/com.covansys.navigati > on > .NavigationServlet?j_btn_text_link="+link,"","alw\ > aysRaised,height=300,width=800,resizable"); > return; > } > > function submitSort(sortBy) > { > document.forms[1].sortKey.value=sortBy; > submitStrutsLink("sort"); > } > > function submitPage(pageDirection) > { > document.forms[1].direction.value=pageDirection; > submitStrutsLink("page"); > } > > function submitStrutsLink(forwardName) > { > document.forms[1].relayTo.value=forwardName; > document.forms[1].submit(); > }] > sourceName [Embedded script] > lineNumber [1] > securityDomain [null] > > > and this exception > > java.lang.NoSuchMethodError: > org.mozilla.javascript.NativeArray.getLength()J > [echo] at > com.gargoylesoftware.htmlunit.javascript.host.Document.get(Document.java:6 > 51 > ) > [echo] at org.mozilla.javascript.ScriptRuntime.getProp(Unknown > Source) > [echo] at org.mozilla.javascript.Interpreter.interpret(Unknown > Source) > [echo] at org.mozilla.javascript.InterpretedScript.call(Unknown > Source) > [echo] at org.mozilla.javascript.InterpretedScript.exec(Unknown > Source) > [echo] at org.mozilla.javascript.Context.evaluateReader(Unknown > Source) > [echo] at org.mozilla.javascript.Context.evaluateString(Unknown > Source) > [echo] at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScri > pt > Engine.java:295) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(Ht > ml > Page.java:712) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlSc > ri > pt.java:209) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlScript.appendChild(HtmlScript.java: > 16 > 8) > [echo] at > com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.handleCha > ra > cters(HTMLParser.java:415) > [echo] at > com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElemen > t( > HTMLParser.java:379) > [echo] at > org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) > [echo] at > org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:249 > ) > [echo] at > org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:101 > 5) > [echo] at > org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:888) > [echo] at > org.cyberneko.html.HTMLScanner$SpecialScanner.scan(HTMLScanner.java:2767) > [echo] at > org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:789) > [echo] at > org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:478) > [echo] at > org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:431) > [echo] at org.apache.xerces.parsers.XMLParser.parse(Unknown > Source) > [echo] at > com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTM > LP > arser.java:334) > [echo] at > com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:258) > [echo] at > com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPag > eC > reator.java:115) > [echo] at > com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCre > at > or.java:84) > [echo] at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java > :5 > 95) > [echo] at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:562) > [echo] at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:444) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:185) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlImageInput.doClickAction(HtmlImageI > np > ut.java:119) > [echo] at > com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement > .j > ava:120) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlImageInput.click(HtmlImageInput.jav > a: > 142) > [echo] at > com.benova.acceptancetest.CxAcceptanceTest.clickImageButtonByName(CxAccept > an > ceTest.java:348) > [echo] at > com.ms.acceptancetest.MSCxAcceptanceTest.doLogin(MSCxAcceptanceTest.java:1 > 73 > 3) > [echo] at > com.ms.acceptancetest.MSAbstractSupervisorApprovalAcceptanceTest.getToSupe > rv > isorHOHApprovalPage(MSAbstractSupe\ > rvisorApprovalAcceptanceTest.java:518) > [echo] at > com.ms.acceptancetest.MSAbstractSupervisorApprovalAcceptanceTest.getToGrou > pD > etailFromHOH(MSAbstractSupervisorA\ > pprovalAcceptanceTest.java:574) > [echo] at > com.ms.acceptancetest.MSSupervisorApprovalViewDetailAcceptanceTest.testVie > wR > eadOnlyDetailsPage(MSSupervisorApp\ > rovalViewDetailAcceptanceTest.java:61) > [echo] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > [echo] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > 39 > ) > [echo] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm > pl > .java:25) > > > Brad said>>>> > From the stack it looks like you might have the wrong rhino jar. > System.getProperties() might tell you a bit more about your classpath but > it"s going > to be a mess with the large number of websphere and htmlunit > dependencies. > Can you > run the test outside of websphere? Does disabling javascript help? What > JDK > version > are you using? > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |