Below mentioned script has been worked in old python (2.7.x) and Robotframework version . The same code is not being worked ,after upgrading the python version from 2.7 to 3.7.2 and the robot version to 3.1.1.
I'm getting this error while executing script:
Variable '${var}' is string, not list or dictionary, and thus accessing item '${var}' from it is not possible.
Code :
${loc} xpath=(//*[contains(@class,"c3-legend-item ")])
: FOR ${row} IN RANGE 1 ${Count}
\ ${Exp_Name} = Get Text ${loc}[${row}]
\ Log ${Exp_Name}