I am writing a test with the robot framework. I am trying to update values in a json field, but I am seeing some odd behavior.
I do a HTTP GET and receive a json. I check what the value is originally,
Log To Console | ${JSON["Components"]["SubComponents"]}
which returns
valueA
Then I try to update the values as below.
${JSON["Components"]["SubComponents"]}= | Set Variable | valueB
If I log the output this way
Log To Console | ${JSON["Components"]["SubComponents"]}
I see
valueB
but if I check this way
Log To Console | ${JSON["Components"]}
I see
{u'SubComponents': valueA, u'MoreComponents': whatever}
What is going on and why is it not updating?
I need to update the JSON field so I can do an HTTP PATCH. I have tried following Json handling in ROBOT But it doesn't work and I think it has something to do with my JSON file having single quotes.
FYI I am new to json and robotframework