Updates:
        Status: WontFix
        Owner: ---
        Labels: -Target-2.5.2

Comment #1 on issue 619 by pekka.klarck: `Variable Should Exist` should support returning true/false depending does variable exist or not
http://code.google.com/p/robotframework/issues/detail?id=619

We decided NOT to implement this for the following reasons:

1) `Variable Should Exists` already has optional `msg` argument so the new `return_status` argument should be added after it. Arguments to `Variable Should Exists` are handled specially to avoid resolving variables, and as a result named argument syntax doesn't work with it. That means that you needed to use the keyword like this:

| ${exists} = | Variable Should Exist | ${VAR} | ignored message | return status |

2) Wrapping `Variable Should Exist` with `Run Keyword And Ignore Error` isn't that complex. At least it isn't more complex/confusing than the above example.

3) One of the original use cases for this functionality was handling a situation where the variable isn't available in the test teardown because it is not assigned yet when the test fails. Now that issue 615 has been implemented, rest of the keywords in the teardown are executed even if a non-existing variable is used.

4) It is easy to set a default value for the variable so that it always exists.

Reply via email to