[Webtest] BUG? Exception in JTidy

Ugo Cei u.cei@cbim.it
Fri, 01 Mar 2002 17:07:59 +0100


This is a multi-part message in MIME format.
--------------040001040305000802060502
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I have this problem when using verifyelementtext:

Error encountered: 
incspe(com.canoo.webtest.engine.ConfigurableTestCase): null
Exception raised: 
java.lang.NegativeArraySizeExceptionjava.lang.NegativeArraySizeException
	at org.w3c.tidy.Node.clone(Node.java:136)
	at org.w3c.tidy.Node.cloneNode(Node.java:889)
	at org.w3c.tidy.Node.cloneNode(Node.java:896)
	at org.w3c.tidy.Node.cloneNode(Node.java:896)
	at org.w3c.tidy.Node.cloneNode(Node.java:896)
	at org.w3c.tidy.Node.cloneNode(Node.java:896)
	at org.w3c.tidy.Node.cloneNode(Node.java:896)
	at org.w3c.tidy.Node.cloneNode(Node.java:896)
	at org.w3c.tidy.DOMNodeImpl.cloneNode(DOMNodeImpl.java:400)
	at com.meterware.httpunit.ParsedHTML.getDOM(ParsedHTML.java:245)
	at com.meterware.httpunit.WebResponse.getDOM(WebResponse.java:356)
	at com.canoo.webtest.steps.Verify.getAllElementsOfType(Verify.java:71)
	at 
com.canoo.webtest.steps.VerifyElementText.doExecute(VerifyElementText.java:119)
	at 
com.canoo.webtest.steps.AbstractTestStepSpecification.execute(AbstractTestStepSpecification.java:62)
	at com.canoo.webtest.engine.ConfigurableTestCase.runTest(ConfigurableTes
tCase.java:40)
	at junit.framework.TestCase.runBare(TestCase.java:140)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:131)
	at junit.framework.TestCase.run(TestCase.java:124)
	at 
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:54)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104)
	at org.apache.tools.ant.Task.perform(Task.java:217)
	at org.apache.tools.ant.Target.execute(Target.java:184)
	at org.apache.tools.ant.Target.performTasks(Target.java:202)
	at org.apache.tools.ant.Project.executeTarget(Project.java:601)
	at org.apache.tools.ant.Project.executeTargets(Project.java:560)
	at org.apache.tools.ant.Main.runBuild(Main.java:454)
	at org.apache.tools.ant.Main.start(Main.java:153)
	at org.apache.tools.ant.Main.main(Main.java:176)

This error appears whenever I use a verifyelementtext. These are the 
elements that I am currently using:

	<verifyelementtext stepid="verify title" type="h2" text="INCIDENZA DI 
SPESA SUL TOTALE BENI E SERVIZI"/>
	<verifyelementtext stepid="verify amount" type="td" name="imptot" 
text="1.174.037.787"/>

Attached, you can find the response file that is being tested.

	Ugo


-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it

--------------040001040305000802060502
Content-Type: text/html; charset=UTF-8;
 name="lastResponse1014998606754.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="lastResponse1014998606754.html"

<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="styles/bpa.css" type="text/css">
<title>Osservatorio Prezzi dei Beni e dei Servizi</title>
</head>
<body>
<div id="logo"> 
 
<span class="title"><a href="index.html" target="_self"><img src="images/titolo_bpa.gif" alt="Benchmarking Prezzi e Acquisti" border="0"></a>
<!-- "Benchmarking<br/>Prezzi e<br/>Acquisti -->
</span>
 <span class="topmenu">
  <a href="index.html">Home</a>&nbsp;<a href="profile.phtml?cat=biomedicali/">Archivio</a>&nbsp;<a href="logout.html">Logout</a>
 </span>

</div>
<html>
<body>
<div id="catmenu">
<table cellspacing="0" cellpadding="0">
<tr>
<td id="biomedicali" class="catmenutitle biomedicali-menu"><a class="menuitem" href="indicatori.phtml?cat=biomedicali/">Biomedicali</a></td><td id="presidi" class="catmenutitle presidi-menu"><a class="menuitem" href="indicatori.phtml?cat=presidi/">Presidi</a></td><td id="consumabili" class="catmenutitle selected consumabili-menu">Consumabili</td><td id="servizi" class="catmenutitle servizi-menu"><a class="menuitem" href="indicatori.phtml?cat=servizi/">Servizi</a></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="8" class="subcatmenu consumabili-menu">
<tr>
<td nowrap="nowrap"><a class="subcatmenuitem" href="indicatori.phtml?cat=consumabili/C_RAD"><em>Pellicole</em></a></td><td nowrap="nowrap"><a class="subcatmenuitem" href="indicatori.phtml?cat=consumabili/C_FIL">Materiale per Dialisi</a></td><td nowrap="nowrap"><a class="subcatmenuitem" href="indicatori.phtml?cat=consumabili/C_MC">Mezzi di Contrasto</a></td><td width="100%">&nbsp;</td>
</tr>
</table>
</div>
</body>
</html>
<div id="content">
<div class="indicatore">
<h2>INCIDENZA DI SPESA SUL TOTALE BENI E SERVIZI </h2>
<h3>
       
<span xmlns:xsp="http://apache.org/xsp" xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:session="http://apache.org/xsp/session/2.0" xmlns:bpadecode="http://bpa.cbim.it/2001/xsp/decode/1.0" xmlns:xsp-request="http://apache.org/xsp/request/2.0">
     Tipologia di prodotto: PELLICOLE RADIOGRAFICHE<br>
</span>
       <span xmlns:xsp="http://apache.org/xsp" xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:session="http://apache.org/xsp/session/2.0" xmlns:bpadecode="http://bpa.cbim.it/2001/xsp/decode/1.0" xmlns:xsp-request="http://apache.org/xsp/request/2.0">
     Ente: A.O. MACCHI<br>
</span>
       <span xmlns:xsp="http://apache.org/xsp" xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:session="http://apache.org/xsp/session/2.0" xmlns:bpadecode="http://bpa.cbim.it/2001/xsp/decode/1.0" xmlns:xsp-request="http://apache.org/xsp/request/2.0">Anno di riferimento: 2000</span>
      
</h3>
<table cellspacing="0" class="indicatore">
<caption></caption>
<tr>
<th>Ente</th><th>Importo Complessivo di Aggiudicazione (IVA compresa) [Lire]</th><th>Spesa per Beni e Servizi [Lire]</th><th>Incidenza</th>
</tr>
<tr>
<td width="25%">A.O. MACCHI</td><td name="imptot" class="lit" width="30%">6.990.259.140</td><td class="lit" width="30%">181.330.000.000</td><td class="lit" width="15%">3,855%</td>
</tr>
</table>
</div>
</div>
</body>
</html>

--------------040001040305000802060502--