I have been searching to no avail I hope someone can help me.
Is there a way know if one string is less than another? In other words, if the name Amy should come before Astor, I would like to receive a result/status of True.
Thank you!
I have been searching to no avail I hope someone can help me.
Is there a way know if one string is less than another? In other words, if the name Amy should come before Astor, I would like to receive a result/status of True.
Thank you!
In Python you can just compare strings with the >
or the <
operator.
Same in Robot.
The python expression "Amy" < "Astor"
evaluates to True.
Now the question is, where you want to use it in Robot Framework.
With a Run Keyword If
? Or with a python inline evaluation?
*** Test Cases ***
Test
${str1}= Set Variable Amy
${str2}= Set Variable Astor
Run Keyword If $str1 < $str2 Log To Console ${str1} comes before ${str2}
Thank you René, I leaned something new today!!
That helped me a lot. I was using two spaces before and after the < symbol.
Merry Christmas to you (and everyone)!
Merry Christmas!