robotframework-style-guide
robotframework-style-guide copied to clipboard
Consider how to create variables in user keywords eg. VAR, @{var}, &{var}
When creating keywords there are currently quite a lot of different ways to create variables.
In a variable section, to create a variable, a list, or a dictionary we use the following:
${var} Variable
@{list} 1 2 3 4
&{dict} key=value solution=user
In user keywords there are now (with equals, because why not..
${dct}= Create Dictionary vs &{dct}= Create Dictionary
${lst}= Create List vs @{lst}= Create List
${var}= Set Variable
But we also have syntax VAR. and that changes things as well:
VAR @{lst}
VAR ${scalar}
VAR &{dict}
Some guideline with this might be good.