1
votes

I want to evaluate a value from list in robot framework with a string value and if condition is true would like to replace that value with some other.But getting error in evaluating expression.

${Con_Type} Set Variable    Paper
Run Keyword If  ${values[0]}==${Con_Type}   Set List Value  ${values[0]}    'P'
1
Next time insert the text of the error message into the question. But before that - read it! There might a lot of useful information which will help you to solve the problem on your own. - Psytho
${values[0]} is not a correct grammar to acces an element of a list. - Psytho

1 Answers

2
votes

on 1st line = after variable name and 4 times space(Tab button on keyboard) after it
on 2nd line expression values should be in single quatations ' '

${Con_Type}=  Set Variable    Paper
Run Keyword If  '${values[0]}'=='${Con_Type}'   Set List Value  ${values[0]}    'P'