Re: [Httpunit-develop] Why not HTML?
Brought to you by:
russgold
From: Ken H. <ke...@nc...> - 2000-12-14 22:07:25
|
Peter, are you returning text/html as the mime-type? Ken Peter Curran wrote: > A colleague is trying to use a test package I developed, and getting some > errors. > The output from HttupUnit is as follows: > > java.lang.RuntimeException: Response is not HTML > at > com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:327) > at com.meterware.httpunit.WebResponse.getFrames(WebResponse.java:311) > at > com.meterware.httpunit.WebResponse.getFrameNames(WebResponse.java:95) > at test.com.casebank.webtest.WebTest.processResponse(WebTest.java:391) > at test.com.casebank.webtest.WebTest.runQuery(WebTest.java:262) > at test.com.casebank.webtest.WebTest.runScript(WebTest.java:206) > at test.com.casebank.webtest.WebTestMain.main(WebTestMain.java:80) > > The HTML code in question is as follows (I have replaced angle brackets > with square brackets, to prevent email problems. I have also verified, by > printing the result from response.getText(), that this really is what is > being passed to HttpUnit): > > [HTML] > [HEAD] > [TITLE]SpotLight Message[/TITLE] > [meta content="31 Dec 99" http-equiv="expires"] > [/HEAD] > [BODY] > [P] > [/P] > [FORM action="../servlet/com.casebank.spotlight.appserver" > method="GET"] > [input value="Ok" name="action" type="submit"] > [/FORM] > [/BODY] > [/HTML] > > The main problem I can see here is that the file does not have a DTD line. > Is that sufficient for HttpUnit to declare it not to be HTML? (Because of > the way these files are being generated, and the design of the test > package, I can't easily stick in a DTD line and try it.) If not, can anyone > see what I am missing, as to why this is not valid? > > Thanks for any help. > > -- > Peter Curran Software Developer Casebank Technologies Inc. > > _______________________________________________ > Httpunit-develop mailing list > Htt...@li... > http://lists.sourceforge.net/mailman/listinfo/httpunit-develop |