[Webtest] VerifyText and special characters

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Fri, 29 Aug 2008 10:01:52 +0200


Hi,

verifyText works on the plain text response from the server, therefore
you have to take care that it contains exactly the text you're verifying
and not for instance &ecirc; or additional spaces. Regex may help or you
 may write your own step performing the verification on
currentResponse.asText() rather than on raw response (such a step should
surely be added in WebTest itself).

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com


WILLETTE, Paul-Emeric wrote:
> Hello,
> 
> I am interested in testing the existence of such a string on a webpage : “Vous n’êtes pas concerné par la seconde session.”
> 
> There are two “special” characters: ‘ê’ and ‘é’
> 
> In fact, when I use accents, the test systematically fails:
> 
> <verifyText text="Vous n'êtes pas concerné par la seconde session."/>
> 
> Or even
> 
> <verifyText text="Vous n'&#234;tes pas concern&#233; par la seconde session."/>
> 
> Is there a trick to solve that?
> 
> Thanks in advance.
> _____________________________________
> Paul-Emeric Willette / Capgemini Sud / Montpellier
> Tel: + 33 6 86 13 48 23 / www.fr.capgemini.com 
> Espace Concorde - ZAC Parc d'Activités de l'Aéroport
> 120 Impasse Jean-Baptiste SAY - 34470 PEROLS
> Ensemble : L’expérience d’une véritable coopération
> _________________________________________________
>  Please consider the environment and do not print this email unless  absolutely necessary. Capgemini encourages environmental awareness.
> 
> 
> 
> 
> 
> 
> 
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is 
> intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to 
> read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message 
> in error, please notify the sender immediately and delete all copies of this message.
> Y��z�fj)b�	b�՞m7��X������hm����+-�Ƨ��(��Y���b�ا~��y�^st==