I would like to use a global list of global maps to manage test data, but I found some unexpected behaviour.
Let’s say I have a globalvar called glist which is a list, and a globalvar gmap as a map. The latter contains only one key (‘map_value’) for testing purposes.
I am trying to get the value from this map of the list, like:
But unfortunately glist.get returns null. Tried other syntaxes like glist or getAt but it is still null.
I can see from the glist.size() that it contains 1 element, but can’t reach the value unless it is something else but a global map.
But here is the tricky part, If I create a local list called locallist in a testcase and put the global gmap there, I can get the ‘map_value’ without problems.