I have a nested list that I am using in Robot Framework. I would like to change one item in a sublist at the Robot Framework level.
My list looks like this:
[ bob, mary, [june, july, august]]
I want to change “july” to something else, say “september”
Robot Framework will let me change ‘bob’ or ‘mary’, but if I try to insert a list, it is converted into strings.
(Oh, I have tried to use the “Insert Into List keyword to insert a new sub list, and other List keywords, no luck with any.)
I am guessing from the lack of response that there isn’t a neat clean solution to this. Here is what I have done:
I created a utility thusly:
I then put this entry in my robot framework test suite file:
(Importing my utility library, of course)
After this runs, the second item (index 1) in the sublist at index 1 of the list will be “NewItem”
Perhaps not the most elegant or flexible, but it will do the job for now