I'm trying to setup a simple while loop, but I keep getting this error:
'While' is a reserved keyword.
Robot Framework 4.1.3 (Python 3.8.10 on linux)
For sanity, I stripped everything out and created the following test with examples straight from the robotcorp docs (https://robocorp.com/docs/languages-and-frameworks/robot-framework/while-loops)
While.robot
*** Settings ***
*** Variables ***
@{ROBOTS}= Bender Johnny5 Terminator Robocop
*** Keywords ***
*** Test Cases ***
Loop Over A List Of Items And Log Each Of Them
FOR ${robot} IN @{ROBOTS}
Log ${robot}
END
Testing While Loop
${x}= Set Variable ${0}
WHILE ${x} < 3
${x}= Evaluate ${x} + 1
IF ${x} == 2
CONTINUE # Skip this iteration.
END
Log x = ${x} # x = 1, x = 3
END
The result:
$ robot tests/While.robot
==============================================================================
While
==============================================================================
Loop Over A List Of Items And Log Each Of Them | PASS |
------------------------------------------------------------------------------
Testing While Loop | FAIL |
'While' is a reserved keyword.
------------------------------------------------------------------------------
While | FAIL |
2 tests, 1 passed, 1 failed
==============================================================================
Am I missing something or is this broken?