Reputation: 1561
I'm learning about Robot framework from course on Udemy and strangely I'm getting error when I'm not supposed be getting error.
*** Variables ***
${VAR} 4
${VAR2} 4
@{VARL} ['python', 'robot']
*** Test Cases ***
TC_001
[Documentation] Using scalar variable
Should Be Equal ${VAR} ${VAR2}
TC_002
Should Not Be Equal As Strings @{VARL}[0] @{VARL}[1]
When running the test on TC_002 I'm getting List '@{VARL}' has no item in index 1.
What am I doing wrong here ?
Upvotes: 0
Views: 853
Reputation: 20077
Your definition of @{VARL}
is not correct - you don't need the square brackets, but just provide the different members with at least two spaces between each:
*** Variables ***
@{VARL} python robot
Upvotes: 4