You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*** Test Cases ***
Without VAR
${data} Fetch Important Data
Set Suite Variable ${data}
With VAR
${data} Fetch Important Data
VAR ${data} ${data} scope=SUITE
*** Keywords ***
Fetch Important Data
RETURN important data
We have a local variable ${data} which we want to promote to suite variable. Using keyword Set Suite Variable is pretty straightforward and clean. On the other hand when we're using VAR we need to use the same ${data} variable twice, first is the name of suite variable we want to create and second is the value of suite variable we want to create.
I propose such improvement VAR ${data} scope=SUITE If using VAR we pass only one positional argument threat this as a name and a value for the new variable
VAR ${not_yet_existing_variable}
What this line should produce? An error that it is not possible to fetch value from variable that is not defined or an empty variable named ${not_yet_existing_variable}?
VAR ${not_yet_existing_variable} ${EMPTY}
Creating empty variable should be explicit?
The text was updated successfully, but these errors were encountered:
Hi, please consider given example
We have a local variable ${data} which we want to promote to suite variable. Using keyword
Set Suite Variable
is pretty straightforward and clean. On the other hand when we're using VAR we need to use the same ${data} variable twice, first is the name of suite variable we want to create and second is the value of suite variable we want to create.I propose such improvement
VAR ${data} scope=SUITE
If using VAR we pass only one positional argument threat this as a name and a value for the new variable
VAR ${not_yet_existing_variable}
What this line should produce? An error that it is not possible to fetch value from variable that is not defined or an empty variable named ${not_yet_existing_variable}?
VAR ${not_yet_existing_variable} ${EMPTY}
Creating empty variable should be explicit?
The text was updated successfully, but these errors were encountered: