18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
String comparios in sahi
Hi,
I am not getting how to do the string comparison in sahi.
I tried this if(a==b)
{some text
}
it is not working
Please any one let me know the procedure for string comparison in sahi
Thanks
I am not getting how to do the string comparison in sahi.
I tried this if(a==b)
{some text
}
it is not working
Please any one let me know the procedure for string comparison in sahi
Thanks
Comments
Remember that you sahi variables precede the $ sign
Example:
if($parametro=="u"){
some text
}
or
Var $strU="u";
if($parametro==$strU){
some text
}
or
if(_isVisible(_button("Aceptar"))){
some text
}
Good Luck
Oscar C (Facilos)
Thanks for your reply.
I have tried all the scenario still it is not working.
If ($(Current - 1 day) =="sun")
{
enter the loop and execute the script
}
Otherwise don't execute the script in Bracket.
Please suggest other solutions
Can you add a _alert($(Current - 1 day)) just before your loop and check if the value of the variable is "sun".
Regards,
Tejas
Yes i tried that and it is displaying Sun on the browser alert box
Regards,
Rahul
Could you be more clear in your condition to help.
want to compare two dates?
that is current?
Thanks
Facilos
No I am not comparing the date
I wanted check the current date -1 is Sunday or not, if it is Sunday then i wanted to execute the script which is enclosed in the if statement(bracket) other wise I just wanted to execute the script which is outside if statement
Thanks,
Rahul
Oscar.
Thank you very much it is working
Regards,
Rahul