I declared the global variables but when I tried to fetch the values from an element it was throwing an error stating the assignment operator is not allowed in when block.
Also I couldn't use the <<
operator either. These are only allowed in the where block of Spock spec.