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.

Check Values for Assert using Parameters

jrsreenivasjrsreenivas Members
edited November -1 in Sahi - Open Source
Hi Friends i am struck up with a small issue .
I want to check for the string where in the string will be
_assertExists(_span("An LOV of type=LOV_TYPE already exists with value1=LOV9));

the same string i am passing variable for $LOV_TYPE and $LOV_Name
i tried with the below statements and i am getting error

1)
_assertExists(_span("An LOV of type="$LOV_TYPE"already exists with value1="$LOV_Name));

2)
_assertExists(_span("An LOV of type="+$LOV_TYPE+"already exists with value1="+$LOV_Name));

Please provide me solution if any one has
Thanks

Comments

  • What is the error mes that u are getting when using 2nd statement ?
  • narayannarayan Administrators
    Hi Sreenivas,

    I thought we had answered this question. You need to use the second option, but with a space before "already". It should look like:

    _assertExists(_span("An LOV of type="+$LOV_TYPE+" already exists with value1="+$LOV_Name));

    The second option should have resulted in an assertion failure rather than a script error.

    Regards,
    Narayan
Sign In or Register to comment.