From: Rousseau, J. R. <JRR...@Ba...> - 2004-11-23 17:42:28
|
Hi All, I'm currently evaluating HtmlUnit to perform our inegration testing. When used insed JUnit, my simple test worked perfectly. I then moved the code inside a Fitnesse Fixture. Unfortunalely now, my simple test does not work anymore (when called from Fitnesse). The Fitnesse server calls my login method that then perform the following HtmlUnit code: WebClient webClient = new WebClient(); URL url = new URL("http://banctec-bxx87tc/pca/index.html"); HtmlPage page = (HtmlPage)webClient.getPage(url); (...) When reading the index page, it throws the following exception: org.apache.xerces.xni.XNIException at org.cyberneko.html.HTMLScanner$ContentScanner.scan(Unknown Source) at org.cyberneko.html.HTMLScanner.scanDocument(Unknown Source) at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source) at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLP arser.java:302) at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:223) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageC reator.java:110) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreat or.java:82) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:5 83) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:550) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:465) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:337) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:281) at web.fitnesse.PCAQueryScreenFixture.login(PCAQueryScreenFixture.java:46) 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:324) at fit.ActionFixture.doCells(Unknown Source) at fit.Fixture.doRow(Unknown Source) at fit.Fixture.doRows(Unknown Source) at fit.Fixture.doTable(Unknown Source) at fit.Fixture.doTables(Unknown Source) at fit.FitServer.process(Unknown Source) at fit.FitServer.run(Unknown Source) at fit.FitServer.main(Unknown Source) Any ideas ? thanks, Jean-Rene Rousseau |