lundi 13 juillet 2020

Problem using Template in Robot Framework

I try to use Template for testing a Login window. Everything works right when I run test case passing two arguments without using templates, but when I try to do as in the example below I get an error message: "Keyword 'test.Login' expected 2 arguments, got 1."

Where is the problem?

Syntax should be:

Templated test case
    [Template]    Example keyword
    first argument    second argument

MY PROBLEM!!!

*** VARIABLES ***
${USER}    user
${PW}      pw

*** KEYWORDS ***
Login    [Arguments]    ${username}    ${password}
    Input Text                         name:username    ${username}
    Input Password                     name:password    ${password}

*** TEST CASES ***
Login Test
      [Template]    Login
      ${USER}    ${PW}
      ${EMPTY}   ${PW}
      etc.

Aucun commentaire:

Enregistrer un commentaire