Euro sign can be different

Bug reports.
Florian
Posts: 75
Joined: Fri Jul 27, 2012 12:57 pm
Location: France (Lyon)
Contact:

Euro sign can be different

Post by Florian » Thu Aug 09, 2012 9:58 am

On my website, I tried to validate two variables using this code:

Code: Select all

Validate.AreEqual(sTemp,PrixPack)
and had and error even if the two string variable seemed to be exactly the same.

Actually, the last char of the string was the euro sign: €
In the first string, it was directly the sign (using the E key from keyboard), whereas the second string used the HTML sign: €

I finally found the difference after 2 hours working on it ... !
Is it a bug or is it something you wanted?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Euro sign can be different

Post by Support Team » Thu Aug 09, 2012 12:38 pm

Hi,

This is because the first parameter is a proper string/char and the second one is a html coded sign but for Ranorex it is a normal string "€".
If you want to check it I would directly use the € sign:
Validate.AreEqual(someBTag.InnerText, "€");
Regards,
Markus
Ranorex Support Team

Florian
Posts: 75
Joined: Fri Jul 27, 2012 12:57 pm
Location: France (Lyon)
Contact:

Re: Euro sign can be different

Post by Florian » Thu Aug 09, 2012 1:04 pm

Thanks for your answer.
Actually the string I am testing is not only the euro sign, but a price. The string could be 14,95 €. I check if the price from the page A is the same than the one on the following page. The euro sign is not coded in the same way.

Thus I used the "left" VB function to keep only the number, removing the euro sign.