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.

How to handle special character between double quotes

deepak123deepak123 Members
edited November -1 in Sahi - Open Source
Hi,

I have just started using this tool and i am facing an issue while validating the messages (client side) having more than some special character between double quotes.

For e.g take a login screen and when password is blank, we get a message
Please enter “Password”.

The expression is determined by sahi is
_assertExists(_span("Please enter “Password”"));

Now the problem is, If i use the above expression, it won't work since it takes the few double quotes as special character (before and after Password).I hope i am able to explain the problem.

Please suggest !!

Thanks
Deepak

Comments

  • narayannarayan Administrators
    Hi Deepak,

    The script looks fine. Could you please explain what error you get?

    Regards,
    Narayan
  • After execution,Steps generated in Controller:

    _setValue(_textbox("txtUserName"), "deepak123");
    _setValue(_password("txtPassword"), "");
    _click(_button("Login"));
    _assertExists(_span("Please enter �Password�"));
    _alert("Password is Blank");
    --Stopped Playback: FAILURE--

    Statements in Log File:

    _setValue(_textbox("txtUserName"), "deepak123");
    _setValue(_password("txtPassword"), "");
    _click(_button("Login"));
    _assertExists(_span("Please enter �Password�"));
    Assertion Failed.
    _alert("Password is Blank");

    Thanks for the prompt reply.

    Thanks
    Deepak
Sign In or Register to comment.