I assume that what you tried actually works if ${MY_VAR} is null, but
if it's e.g. a string evaluating the expression fails. You could try
using quotes around both ${MY_VAR} and ${null} but then the expression
is true also if ${MY_VAR} contains string "None" (Jython converts null
to None automatically). One possibility would be using following
construct, but it gets a bit complicated.
| ${status} | ${ignored}= | Run Keyword And Expect Error | Should Be
Equal | ${MY_VAR} | ${null}
| Set Variable If | "${status}" == "PASS" | xxx | yyy |
It might be best that you create a special keyword for this in your
library. Alternatively keyword(s) that get the value of ${MY_VAR} can
check is the value null or not.
Cheers,
.peke
I'm not sure would Set Variable If None be that commonly used. Please
submit an enhancement request to the tracker anyway. If it gets enough
votes (i.e. stars) we can add it in the future.
Cheers,
.peke