[Webtest] [webtest][JIRA] Created: (WT-145) verifyXPath fails on non HTML or XML mime type
Peter Becker (JIRA)
webtest@lists.canoo.com
Wed, 25 Jan 2006 18:54:27 +0100 (CET)
verifyXPath fails on non HTML or XML mime type
----------------------------------------------
Key: WT-145
URL: http://webtest-community.canoo.com/jira/browse/WT-145
Project: WebTest
Type: Bug
Versions: 1.7
Environment: WinXP, JDK 1.4.2, Ant 1.6.2, Webtest 1.7 R_1135
Reporter: Peter Becker
<verifyXPath> denies to work if it does not recognize the mime type sent by the server. Our app uses application/vnd.visio for DatadiagramML format (Visio's XML format) which we know is XML but I could not find a way to teach Webtest to accept that.
Here is a sample script:
<target name="__case">
<echo>Running webtest '${ant.project.name}'</echo>
<webtest name="${ant.project.name}">
&config;
<steps>
&login;
<clickLink description="Open page" label="${report.main.page}" />
<setSelectField description="Select Visio export format" text="${name.visioExport}" name="${field.select.reportExportFormat}" />
<clickButton description="Request report" label="${button.request.report.text}" />
<verifyXPath description="Check we have a DataDiagramML file" xpath="/VisioDocument/@version" text="11.0"/>
&logout;
</steps>
</webtest>
</target>
And here is the resulting error:
BUILD FAILED
C:\Dokumente und Einstellungen\pbe\workspaces\iteraplan\iteraplan\testing\functional\tests\visioExport\downloadBasicInformationFlowGraph.xml:11: The following error occurred while executing this line:
C:\Dokumente und Einstellungen\pbe\workspaces\iteraplan\iteraplan\testing\functional\testSuite.xml:63: The following error occurred while executing this line:
C:\Dokumente und Einstellungen\pbe\workspaces\iteraplan\iteraplan\testing\functional\tests\visioExport\downloadBasicInformationFlowGraph.xml:18: Canoo Webtest: R_1135.
Test failed.
Test step verifyXPath (C:\Dokumente und Einstellungen\pbe\workspaces\iteraplan\iteraplan\testing\functional\tests\visioExport\downloadBasicInformationFlowGraph.xml:25: ) named "Check we have a DataDiagramML file" failed with message "Current response is not an HTML or XML page but of type application/vnd.visio (com.gargoylesoftware.htmlunit.UnexpectedPage)"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira