Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fetch value from list in robot framework

I want to fetch the values which are in list I have declared (@{EMAIL_LIST} with 3 values in it)

I am using

: FOR    ${a}    IN RANGE    0    3
\    Input Text    id=username    @{EMAIL_LIST}[a]

It is giving the error:

List variable '@{EMAIL_LIST}' used with invalid index 'a'.

Please make me correct, Thanks in advance :)

like image 644
Umesh Avatar asked Mar 03 '17 10:03

Umesh


2 Answers

You should use ${a} as index instead of 'a'

  : FOR    ${a}    IN RANGE    0    3
  \    Input Text    id=username    @{EMAIL_LIST}[${a}]
like image 127
Rakesh Avatar answered Sep 28 '22 10:09

Rakesh


: FOR ${a} IN @{EMAIL_LIST} \ Input Text id=username ${a}
like image 30
siva Avatar answered Sep 28 '22 09:09

siva