From: Brad C. <yo...@br...> - 2005-01-14 19:55:45
|
This is listed as a change since 1.4: JavaScript: Fixed bug in window.frames[i] (was introduced in 1.4). Can you get the latest CVS and see if that fixes your problem? Brad C --- "Lodge, Gary" <Gar...@ac...> wrote: > 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.navigation > .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:651 > ) > [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(JavaScript > Engine.java:295) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(Html > Page.java:712) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScri > pt.java:209) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlScript.appendChild(HtmlScript.java:16 > 8) > [echo] at > com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.handleChara > cters(HTMLParser.java:415) > [echo] at > com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement( > 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:1015) > [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(HTMLP > arser.java:334) > [echo] at > com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:258) > [echo] at > com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageC > reator.java:115) > [echo] at > com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreat > 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(HtmlImageInp > ut.java:119) > [echo] at > com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.j > ava:120) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlImageInput.click(HtmlImageInput.java: > 142) > [echo] at > com.benova.acceptancetest.CxAcceptanceTest.clickImageButtonByName(CxAcceptan > ceTest.java:348) > [echo] at > com.ms.acceptancetest.MSCxAcceptanceTest.doLogin(MSCxAcceptanceTest.java:173 > 3) > [echo] at > com.ms.acceptancetest.MSAbstractSupervisorApprovalAcceptanceTest.getToSuperv > isorHOHApprovalPage(MSAbstractSupe\ > rvisorApprovalAcceptanceTest.java:518) > [echo] at > com.ms.acceptancetest.MSAbstractSupervisorApprovalAcceptanceTest.getToGroupD > etailFromHOH(MSAbstractSupervisorA\ > pprovalAcceptanceTest.java:574) > [echo] at > com.ms.acceptancetest.MSSupervisorApprovalViewDetailAcceptanceTest.testViewR > 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(DelegatingMethodAccessorImpl > .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 > |