Closed HolQue closed 4 weeks ago
The following code defines a list in two ways (param1 and param2): with a single index value and with an index applied to a list.
param1
param2
"listParam" : [0,1,2], "index" : 1, "param1" : [${index}, "B"], "param2" : [${listParam}[${index}], "B"]
The outcome in both ways is a list [1, "B"]. This is like expected.
[1, "B"]
Now I put the param2 expression into another list:
"param3" : [[${listParam}[${index}], "B"], "C"]
Outcome is an error:
Expecting ':' delimiter: line ...
Now I move the dollar operator expression inside the innermost list from first position to last position:
"param4" : [["B" , ${listParam}[${index}]], "C"]
Outcome is an error (now another delimiter is missing):
Expecting ',' delimiter: line ...
I cannot see that a delimiter is missing and would expect that param3 and param4 contain the defined lists.
param3
param4
Addendum
I define a nested list with every element is ${listParam}[${index}]
${listParam}[${index}]
"param5" : [${listParam}[${index}], [${listParam}[${index}], ${listParam}[${index}]], ${listParam}[${index}]]
Error: 'Invalid expression while handling the parameter '[${listParam}[${index}]'.'!
Covered by JPP_1400
Hello Holger,
This issue is fixed on stabi branch, the test case JPP_1400 is also enabled.
Thank you, Son
Retest successful. Issue can be closed.
integrated in RobotFramework AIO 0.11.0
The following code defines a list in two ways (
param1
andparam2
): with a single index value and with an index applied to a list.The outcome in both ways is a list
[1, "B"]
. This is like expected.Now I put the
param2
expression into another list:"param3" : [[${listParam}[${index}], "B"], "C"]
Outcome is an error:
Expecting ':' delimiter: line ...
Now I move the dollar operator expression inside the innermost list from first position to last position:
"param4" : [["B" , ${listParam}[${index}]], "C"]
Outcome is an error (now another delimiter is missing):
Expecting ',' delimiter: line ...
I cannot see that a delimiter is missing and would expect that
param3
andparam4
contain the defined lists.Addendum
I define a nested list with every element is
${listParam}[${index}]
"param5" : [${listParam}[${index}], [${listParam}[${index}], ${listParam}[${index}]], ${listParam}[${index}]]
Outcome is an error:
Error: 'Invalid expression while handling the parameter '[${listParam}[${index}]'.'!