You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to robotframe...@googlegroups.com
Hello,
is it possible to iterate over dictionary in robot like I can do in python:
dict = {'a' : 'oiu', 'b' : 'iuy'}
for key, value in dict.iteritems():
print 'key: ' + key
print 'value: ' + value
?
Curtis Matthews
unread,
Oct 22, 2013, 1:51:04 PM10/22/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to robotframe...@googlegroups.com
There is a library called Collections that contains keywords that you can use to manipulate dictionaries. Don't know if this is the most Pythonic solution but it works if you import Collections into your test suite: Iterate on Dictionary ${dict}= Create Dictionary a oiu b iuy @{keys}= Get Dictionary Keys ${dict} # keys will be a list of key items :FOR ${key} IN @{keys} \ Log Key: ${key} \ ${item}= Get From Dictionary ${dict} ${key} \ Log Item: ${item}
Kevin O.
unread,
Oct 22, 2013, 9:58:31 PM10/22/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to robotframe...@googlegroups.com
An alternative, also using the Collections library that Curtis mentioned: