of course.

Here's a sample of the macro that we created:

 

   <macrodef name="checkMenuItem" description="Check the position and caption 
of menu item">
   <attribute name="level1" />
   <attribute name="level1position" />
   <attribute name="level2" default="true"/>
   <attribute name="level2position" default=""/>
   <attribute name="level3" default="true"/>
   <attribute name="level3position" default=""/>
   <attribute name="level4" default="true"/>
   <attribute name="level4position" default=""/>
   
       <sequential>
     <!-- Check the position and the text of top-level menu item-->
     <clickLink xpath="//div/ul/li[contains(@id, 
'menu')]...@{level1position}]/a[text()='@{level1}']"/>
      <not>


During the test, the replacement variables are then replace with their proper 
values as defined in the webtest:

 

 <checkMenuItem level1="Mon travail" level1position="4"/>


 

I also have the paths for deeper levels, like the one below:

       <clickLink xpath="//div/ul/li[contains(@id, 
'menu')]...@{level1position}]/ul/l...@{level2position}]/a[text()='@{level2}']"/>


And the corresponding tags:

 <checkMenuItem level1="Mon travail" level1position="4" level2="Page d'accueil" 
level2position="1"/>
 <checkMenuItem level1="Mon travail" level1position="4" level2="Mes alertes de 
détection" level2position="2"/>


And while the last one above succeeds, the following does not:

      <checkMenuItem level1="Rapports" level1position="5" level2="Alertes 
détection" level2position="1"/>


I am assuming that this is due to the accented characters, but I cannot confirm 
that.

 

Gert
 


From: [email protected]
To: [email protected]; [email protected]; [email protected]
Subject: RE: [Webtest] Tests in French
Date: Tue, 15 Jun 2010 10:23:59 -0400







Can we see the XML source for the test that is failing?
 
Have you tried removing the embedded quote & trying the match without the quote 
(changing the regex, also, of course)?
 
--
Jonathan Rosenberg
Founder & Executive Director, Tabby's Place
http://www.tabbysplace.org/
 
 
 


From: Gert Pauwels [mailto:[email protected]] 
Sent: Tuesday, June 15, 2010 10:19 AM
To: [email protected]; [email protected]; [email protected]
Subject: RE: [Webtest] Tests in French
 
Hi guys,
 
both the &apos; and the escaping options did not work.
 
Gert
 



From: [email protected]
To: [email protected]; [email protected]; [email protected]
Subject: RE: [Webtest] Tests in French
Date: Tue, 15 Jun 2010 16:14:43 +0200

that is a possibility.
And what about characters with accents like é, è, ê etc.?
 
Gert
 



From: [email protected]
To: [email protected]; [email protected]; [email protected]
Subject: RE: [Webtest] Tests in French
Date: Tue, 15 Jun 2010 10:12:21 -0400

Should this be 
 
                'page d&apos;acceuil'
 
?
 
--
Jonathan Rosenberg
Founder & Executive Director, Tabby's Place
http://www.tabbysplace.org/
 
 
 


From: [email protected] [mailto:[email protected]] On 
Behalf Of Thomas Klein
Sent: Tuesday, June 15, 2010 10:01 AM
To: [email protected]; Gert Pauwels
Subject: RE: [Webtest] Tests in French
 

Hi Gert,

 

not sure... did you check if "escaping" the inline single quote makes a 
difference?

like in 'page d\'acceuil' ?

...or perhaps using a regEx instead a simple string match?

 

HTH

 

Thomas Klein 
Senior Associate, QA | SapientNitro 
  



From: [email protected] [[email protected]] On Behalf 
Of Gert Pauwels [[email protected]]
Sent: Tuesday, June 15, 2010 15:49
To: [email protected]
Subject: [Webtest] Tests in French

Hi,
 
I was wondering. How do we use Canoo with French applications? My webtest seems 
to keep on failing because of the single quotes in the caption 'Page 
d'accueil', is this possible?
 
Any ideas are more than welcome.
 
Gert



Hotmail: Free, trusted and rich email service. Get it now. 
 



Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up now. 



Hotmail: Trusted email with powerful SPAM protection. Sign up now.              
                          
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969

Reply via email to