10 messages in com.canoo.lists.webtestRe: [Webtest] Bug: Inconsequent behav...
FromSent OnAttachments
Denis N. Antonioli21 Mar 2005 12:56 
Dierk Koenig21 Mar 2005 23:00 
Denis N. Antonioli22 Mar 2005 00:45 
Marc Guillemot22 Mar 2005 01:10 
Denis N. Antonioli22 Mar 2005 14:50 
Denis N. Antonioli22 Mar 2005 22:20 
Marc Guillemot23 Mar 2005 04:27 
Denis N. Antonioli23 Mar 2005 05:30 
Marc Guillemot23 Mar 2005 06:05 
Marc Guillemot23 Mar 2005 06:08 
Subject:Re: [Webtest] Bug: Inconsequent behavior with verifyxpath!
From:Denis N. Antonioli (deni@canoo.com)
Date:03/22/2005 02:50:53 PM
List:com.canoo.lists.webtest

Hallo Marc

well, I think I understand the problem now. As Mittie pointed out, the two steps works at different levels on the document.

Verifytext works on the raw source, so it finds unprocessed entities,but Verifyxpath works on the dom, and it must obviously parses the html document first. If it were xml, the parser would be obliged to resolve all entities, I guess that's the case for html too.

Would it be possible for verifyxpath to translate the entities in the text parameter? verifytext would then succeed by comparing the entities (ü) in its parameter and in the html document, and verifyxpath would succeed comparing the intended character (ü) with whatever encoding webtest is running.

dna

On 22 mars 05, at 10:10, Marc Guillemot wrote:

Hi Denis,

not sure that the xpath explorer would help in this case. It seems to be an encoding issue and xpath explorer would bring its own encoding "interpretation". What is the encoding returned by your webserver? What is the default encoding in the shell where you're running your webtest?

Marc.

Denis N. Antonioli wrote:

Hallo Mittie I checked the document with xpath explorer. The dom shows a single text() for the complete <h2>...</h2>. In that text, the &uuml; has been converted to unicode \u00FC. Thanks dna On Tue, 22 Mar 2005, Dierk Koenig wrote:

Hi Denis,

have you looked at it in the xpath explorer or some other dom visualizer? I guess there is some extra node in the dom for the uuml entity. The verifytext still doesn't fail because it works on the raw input, not on the dom.

cheers Mittie

-----Original Message----- From: webt@lists.canoo.com [mailto:webt@lists.canoo.com]On Behalf Of Denis N. Antonioli Sent: Montag, 21. Marz 2005 21:57 To: webt@lists.canoo.com Subject: [Webtest] Bug: Inconsequent behavior with verifyxpath!

Hi

I just found a strange issue with the latest release of webtest:

I'm checking a file that contains entities such as:

<html> <head> </head> <body> <h2>Resultate f&uuml;r das Team 33</h2> </body> <html>

In the webtest, I use alternatively the following two expression: <verifyxpath xpath="/html/body/h2" text="Resultate f&amp;uuml;r das Team 33"/> <verifytext text="Resultate f&amp;uuml;r das Team 33"/>

Obviously, both should work, but only verifytext is working. The verifyxpath fails with: /html/body/h2 evaluates to: Resultate f?r das Team 33, expected value is: Resultate f&uuml;r das Team 33

Is this known? Any hint on how to solve this?

Best dna