18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

euro special character problem

sm@thsm@th Members
edited October 2010 in Sahi - Open Source
Hello,

When I use the sahi controler in java mode on https pages, I can't play the record via Junit test, I have the following error :

for this assert : assertEquals("77.00 €", browser.strong("77.00 €").text());

the error is : error:_sahi.setServerVarPlain('___lastValue___Wed Oct 27 13:37:34 CEST 2010', _getText(_strong("77.00 €")))
Error: The parameter passed to _getText was not found on the browser

I have read this post with id 1302 (Sorry i can't post the url because new member) and then tried this assert :

assertEquals("77.00 €", browser.strong("77.00 \u20ac").text());
or
assertEquals("77.00 \u20ac", browser.strong("77.00 \u20ac").text());

But it doesn't work.

In html source the € value is used, and the assert work well if record is played in sahi mode via controler playback

So please what's the solution

Comments

  • narayannarayan Administrators
    Hi,

    We will check and get back to you.

    Regards,
    Narayan
  • Hi,

    It found the problem...

    The solution was to save the Junit file in UTF-8 (Eclipse default encoding is cpl1252 on win32). So saving the test file in UTF-8 solved the problem, and the test runs well.

    Thks for your reply narayan

    Regards
  • narayannarayan Administrators
    Great! Thanks for the update!
This discussion has been closed.