Search code examples
robotframeworkrpa

Robot framework - get a value from a list


I have used the Get Column Values from ExcelLibrary in order to get an entire column from a particular excel file, the column was assined to @{vinrange} as [ ('A1', u'VIN') | ('A2', u'032145') | ('A3', u'051478') | ('A4', u'124578') ]

I want to do a loop in order to only get the value (2nd argument) as [ 'VIN' , '032145' , '051478' , '124578' ]

enter image description here

How can i accomplish that? I'm using Ride


Solution

  • If the result of the LOG ${VAR1} for the first element is, ('A1', u'VIN') then it is a tuple. You can use it like a list, so to get the second tuple member, you can use: LOG ${VAR1[1]}