vendredi 14 décembre 2018

Assign a variable within the keyword "Run Keywords" possible?

following code is producing some problem:

API Setup
[Arguments]                           ${url}                           ${username}    ${password}    ${run}=True    ${fail}=False
Run Keyword If                        ${run}
...  Run Keywords     
     ...  ${passed}=                  Run Keyword And Return Status    Setup          ${url}         ${username}    ${password}
     ...  AND  Log To Console         ${passed}
     ...  AND  Should Not Be Equal    ${fail}                          ${passed}

When I try to execute that, my RF says: Variable '${passed}' not found.

The RED IDE also says

Multiple markers at this line:
  • Variable 'passed' is used, but not defined
  • Keyword name '${passed}=' contains variables. RED is unable to validate 
    arguments given to this keyword

Does the keywords "Run Keywords" not allow any assignments of values to variables and if so, is there any "best practice" way to do what I want to do?

Thanks!

Aucun commentaire:

Enregistrer un commentaire