How can I set the value of a dictionary element to the result of a keyword in Robot Framework?

Viewed 31632

I know that I can access a single element from a dictionary object with this format ${dict['KEY']}. Like this:

|   | Log | ${dict['KEY']} |

And I can set a regular old scalar like this:

|   | ${scalar}= | RFKeyword | "Yowp"

But if I try to set a dictionary element like this

|   | ${dict['KEY']}= | RFKeyword | "Yowp"

I get "RFKeyword", "Yowp" in the variable, rather than the result of what RFKeyword produces when processing "Yowp" like I do with this

|   | ${scalar}= | RFKeyword | "Yowp"

Assistance please

2 Answers
Related