Comment #2 on issue 633 by pekka.klarck: Run Keyword Unless problem
http://code.google.com/p/robotframework/issues/detail?id=633

The problem is that every keyword needs to always return something, and `None` is the best value to return in this case. Somehow special casing `Run Keyword If/Unless` is possible but, in my opinion, not worth the relatively big effort. Are you Mika interested to look at that or should I just close this as as WontFix?

Note that normally you can use `Set Variable If` as a workaround as illustrated below. Moving complicated logic like this into a test library is often the best solution, though.

  ${var1} =  Run Keyword If  '${test}' == 'PASS'  blaa blaa
  ${var2} =  Run Keyword Unless  '${test}' == 'PASS'  blaa blaa
  ${var} =   Set Variable If  ${var1} is not None  ${var1}  ${var2}


Reply via email to