-1

I want to use for loop to iterate the element in a list. but i think the library is missing. when IN keyword is taken it gives error.

*** Test Cases ***
Acuvue inquiry

    @{index} =    BuiltIn.Create List    a    b
    FOR    ${item}    IN    @{index}
        BuiltIn.Log    ${item}

Error :

Acuvue Inquiry

Acuvue inquiry | FAIL | FOR loop contains no keywords.

Bhagyadish
  • 11
  • 1
  • 3
  • the pythonic `in` is written in small letters - not capital ones. I don't see what the python tag has to do with your code as that seems not to be python. please fix your tags and/or code. you are also not using one bit of selenium in your code if I am not mistaken. – Patrick Artner May 10 '20 at 17:07
  • The tags you have been using are not appropriate for this question. Please take the [tour], review [what are tags and how should I use them?](//stackoverflow.com/help/tagging) and [edit] your post. Remember to at least read the mouseover on the tags you are using when asking a question. – Patrick Artner May 10 '20 at 17:07

1 Answers1

0

The for loop in RobotFramework follows a very strict syntax - this is the "new" syntax, where the in-loop keywords don't start with \, but the loop body must be closed with an END:

FOR    ${item}    IN    @{index}
        BuiltIn.Log    ${item}
END
Todor Minakov
  • 19,097
  • 3
  • 55
  • 60