[Webtest] Bug: Inconsequent behavior with verifyxpath!
Denis N. Antonioli
webtest@lists.canoo.com
Wed, 23 Mar 2005 07:20:46 +0100
Hi
the website for neko is up again and, what do I see there?
The parser has a feature=20
http://apache.org/xml/features/scanner/notify-builtin-refs.
I will try experiment with it :-)
dna
On 22 mars 05, at 23:51, Denis N. Antonioli wrote:
> Hallo Marc
>
> well, I think I understand the problem now.
> As Mittie pointed out, the two steps works at different levels on the=20=
> document.
>
> Verifytext works on the raw source, so it finds unprocessed=20
> entities,but Verifyxpath works on the dom, and it must obviously=20
> parses the html document first. If it were xml, the parser would be=20
> 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=20=
> text parameter?
> verifytext would then succeed by comparing the entities (ü) in=20
> its parameter and in the html document, and verifyxpath would succeed=20=
> comparing the intended character (=FC) with whatever encoding webtest =
is=20
> 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=20=
>> be an encoding issue and xpath explorer would bring its own encoding=20=
>> "interpretation". What is the encoding returned by your webserver?=20
>> What is the default encoding in the shell where you're running your=20=
>> webtest?
>>
>> Marc.
>>
>> Denis N. Antonioli wrote:
>>> Hallo Mittie
>>> I checked the document with xpath explorer. The dom shows a single=20=
>>> text()
>>> for the complete <h2>...</h2>. In that text, the ü has been=20
>>> 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: webtest-admin@lists.canoo.com
>>>>> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Denis N.=20
>>>>> Antonioli
>>>>> Sent: Montag, 21. Marz 2005 21:57
>>>>> To: webtest@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ür das Team 33</h2>
>>>>> </body>
>>>>> <html>
>>>>>
>>>>> In the webtest, I use alternatively the following two expression:
>>>>> <verifyxpath xpath=3D"/html/body/h2" text=3D"Resultate =
f&uuml;r=20
>>>>> das Team 33"/>
>>>>> <verifytext text=3D"Resultate f&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=20
>>>>> value is: Resultate für das Team 33
>>>>>
>>>>>
>>>>> Is this known?
>>>>> Any hint on how to solve this?
>>>>>
>>>>>
>>>>> Best
>>>>> dna
--=20
A symbol name is a terrible thing to waste, because you have only
52*53**254 of these. :-)
-- Randal L. Schwartz in <8cenhei4mx.fsf@gadget.cscaper.com>