[Webtest] XML Response
Guido García Bernardo
webtest@lists.canoo.com
Tue, 16 Mar 2004 10:16:32 +0100
Hello,
I'm testing a web application that receives a request and responds with
a xml response (Content-Type = text/xml).
When I try to invoke a URL, I get the following exception
(com.meterware.httpunit.NotHTMLException):
the content type of the response is 'text/xml': it must be 'text/html'
in order to be recognized as HTML. Is there any solution?
Thank you!!
Guido.
PD. Complete stack trace:
Exception raised: com.canoo.webtest.engine.StepExecutionException:
Unexpected exception caught: com.meterware.httpunit.NotHTMLException:
The content type of the response is 'text/xml': it must be 'text/html'
in order to be recognized as HTML, Step: ClickButton at
file:C:/workspace/visord_test/build/tests/visord/test-visord.xml:28:
with (label="Aceptar", stepId="Submit the simple form",
stepType="clickbutton")com.canoo.webtest.engine.StepExecutionException:
Unexpected exception caught: com.meterware.httpunit.NotHTMLException:
The content type of the response is 'text/xml': it must be 'text/html'
in order to be recognized as HTML, Step: ClickButton at
file:C:/workspace/visord_test/build/tests/visord/test-visord.xml:28:
with (label="Aceptar", stepId="Submit the simple form",
stepType="clickbutton")
at com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:343)
at com.canoo.webtest.steps.Step.execute(Step.java:105)
at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
at
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:61)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
...