Hi,
You always need to use @{list} variables if you want the value to be
expanded. The problem is that you cannot really combine it with the
&{dict}[key] syntax in a single variable access. These ought to work
(but I didn't test them):
1. First get the items into a separate variable and then iterate over them:
@{items} = Set variable &{my_dictionary}[list_of_items]
:FOR ${item} IN @{items}
# ...
2. Access dictionary item using the extended variable syntax:
:FOR ${item} IN @{my_dictionary['list_ot_items']}
3. If the dictionary is created in Robot data, values ought to be
accessible using `dict.key` notation in addition to `dict['key']`.
That would simplify the above a little:
:FOR ${item} IN @{my_dictionary.list_ot_items}
Cheers,
.peke
PS: I've been thinking for some time that I should write a post
explaining the differences about ${scalar}, @{list} and &{dict}
variables. The documentation in the User Guide is somewhat confusing,
because the details about these different variables have changed over
the years and documentation hasn't been fully re-written.
> --
> 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-u...@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.
--
Agile Tester/Developer/Consultant ::
http://eliga.fi
Lead Developer of Robot Framework ::
http://robotframework.org