run keyword if x is not equal to y

10,427 views
Skip to first unread message

jloyzaga

unread,
Aug 1, 2016, 2:52:42 AM8/1/16
to robotframework-users
I've looked at the documentation and its not clear = what operator do I use ? 

is it  !=

?

Nesat Ufuk

unread,
Aug 1, 2016, 4:53:19 AM8/1/16
to robotframework-users
Yes, it is == or !=

Kevin O.

unread,
Aug 1, 2016, 10:17:41 AM8/1/16
to robotframework-users
RF inherits a lot of style and functionality from Python. In Python, a single equals sign is only for assignment. Double for comparison.

For readability you can use Run Keyword Unless

Run Keyword Unless    x == y    Some Keyword

or 

Run Keyword If    x != y    Some Keyword


Reply all
Reply to author
Forward
0 new messages