Hi,
I am trying to
test a small web application using
jsp, javascript.
When executing the next testing method:
public void testFormMatriculeSubmit() {
beginAt("mandatory.jsp");
submit("action1");
assertLinkPresentWithImage("b_button_previous.gif");
}
I get an error (after the "submit in the method"):
The content type of the response is 'text/javascript': it must be 'text/html' in order to be recognized as HTML
com.meterware.httpunit.NotHTMLException: The content type of the response is 'text/javascript': it must be 'text/html' in order to be recognized as HTML
at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:916)
at com.meterware.httpunit.WebResponse.getTitle(WebResponse.java:81)
at net.sourceforge.jwebunit.HttpUnitDialog.getResponsePageTitle(Unknown Source)
at net.sourceforge.jwebunit.WebTester.assertTitleEquals(Unknown Source)
at net.sourceforge.jwebunit.WebTestCase.assertTitleEquals(Unknown Source)
at wat._test.Test_FirstWebApp.testFormMatriculeSubmit4(Unknown Source)
Doesn't httpunit normally supports javascript?
If not are there alternatives? Later on I'll have to test a more complicated web application using
Struts (and javascript).
Thanks!