如果是机器人框架中的Else-if

Nat*_*ang 4 testing automated-tests if-statement python-2.7 robotframework

我希望通过使用else获取关键字的值.

例:

String text = ""  
If variable > 5
   text = "one";
else if variable <5
   text = "two";
else
   text = "three";
Run Code Online (Sandbox Code Playgroud)

在机器人框架中

我用的是代码

${txt}    Set Variable
${txt}=    Run Keyword If    ${length} > 5    Some Keyword
\    ELSE IF    ${length} < 5    Some Keyword
\    ELSE    Some Keyword
Log       ${txt}
Run Code Online (Sandbox Code Playgroud)

错误!!!

In Keyword ELSE IF  ;  Keyword name cannot be empty
Run Code Online (Sandbox Code Playgroud)

Min*_*ang 11

只需在ELSE IF关键字之前的第一个单元格中添加三个点(...)

${txt}    Set Variable
${txt}=    Run Keyword If    ${lenght} > 5    Some Keyword
...    ELSE IF    ${lenght} < 5    Some Keyword
...    ELSE    Some Keyword
Log       ${txt}
Run Code Online (Sandbox Code Playgroud)