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.

UTF-8

chejness7chejness7 Members
edited November -1 in Sahi - Open Source
Can Sahi check values on UI which are UTF-8 encoded? (Chinese characters)
For ex: hk.weather.yahoo.com

Please reply back asap.

Regards,
Chejness.

Comments

  • narayannarayan Administrators
    Hi Chejness,

    Sahi supports UTF-8 and works with Chinese characters. While editing scripts, make sure you save it in UTF-8 format.

    Regards,
    Narayan
  • nagarnagar Members
    edited March 2012
    Hi Narayan,

    I saved script in UTF-8 format (using Notepad), but still I am having trouble...
    My issue is:

    I am trying to read an XML file, which contains UTF-8 characters.
    My XML file is:
    <Entity>
    <Action>
    <TC ID="1">
    <Obj name="rulename" type="textbox">गूगल</Obj>
    <Enable></Enable>
    <Disable></Disable>
    </TC>
    <TC ID="2">
    <Obj name="szone" type="listbox">WAN</Obj>
    <Enable></Enable>
    <Disable></Disable>
    </TC>
    <TC ID="3">
    <Obj name="dzone" type="listbox">WAN</Obj>
    <Enable></Enable>
    <Disable>4,5,6,7,8,9,10,11,12,13,14</Disable>
    </TC>
    </Action>
    </Entity>
    Now when I try to read this XML file and find the length of child nodes <TC>, it returns 0 length.
    My sahi code for reading XML is:
    $xmlstr = _readFile($filename);
    var $x = new XML($xmlstr);
    var $ActLen = $x.Action.child("TC").length();

    And so, I am not able to proceed further, regarding reading value from TC ID=1.
    Kindly help in this issue.
  • nagarnagar Members
    Hi Narayan,

    Please throw some light on this issue, as Sahi supports UTF-8 characters.
Sign In or Register to comment.