*** Variables ***
${exlogic} ${EMPTY}
*** Test Cases ***
Truthy
Run Keyword If "${exlogic}" == "True" MyKeyword ${exlogic}
Run Keyword Unless "${exlogic}" == "True" MyKeyword ${exlogic}
*** Keywords ***
MyKeyword
[Arguments] ${var}
Run Keyword If "${var}" == "True" Log This is "\${var}"==${var} when is True
Run Keyword Unless "${var}" == "True" Log This is "\${var}"==${var} when is Not True
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
--
To post to this group, send email to robotframe...@googlegroups.com.
I agree with Bryan.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
We don't want to use Python variable files because it becomes more complicated to override a robot variable from the command line.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
Have you considered creating a keyword that runs in suite setup that iterates over all of the variables, converting the ones that have the string values "True", "False", or "None" to the actual values? That should be pretty easy to write.
On Fri, Jul 28, 2017 at 6:20 AM, Alex Payne <alexp...@gmail.com> wrote:
External Python libraries are extracting the variables from robot to use as toggles. There are Python comparisons using `if myvar is True:`
We are also using boolean comparisons in robot using these variables. We need to avoid using string comparisons or conversions where we really expect to have Boolean values. It is important for me to have uniformity in this case and using all string values instead is not acceptable to the org. There are others consuming this code and I want to simplify it as much as possible so there are minimal nuances.
We don't want to use Python variable files because it becomes more complicated to override a robot variable from the command line.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Have you considered creating a keyword that runs in suite setup that iterates over all of the variables, converting the ones that have the string values "True", "False", or "None" to the actual values? That should be pretty easy to write.
On Fri, Jul 28, 2017 at 6:20 AM, Alex Payne <alexp...@gmail.com> wrote:
External Python libraries are extracting the variables from robot to use as toggles. There are Python comparisons using `if myvar is True:`
We are also using boolean comparisons in robot using these variables. We need to avoid using string comparisons or conversions where we really expect to have Boolean values. It is important for me to have uniformity in this case and using all string values instead is not acceptable to the org. There are others consuming this code and I want to simplify it as much as possible so there are minimal nuances.
We don't want to use Python variable files because it becomes more complicated to override a robot variable from the command line.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
robot --variable foo:int:42 --variable bar:bool:true --variable baz:float:3.1415
robot --variable (int)foo:42 --variable (bool)bar:true --variable (float)baz:3.1415
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.