Create an Empty List and push data in an Iteration using Robot Framework Create an Empty List and push data in an Iteration using Robot Framework selenium selenium

Create an Empty List and push data in an Iteration using Robot Framework


In your code you missed the declaration, in other words you need to create a List using the keyword Create List

To declare a List you need to use the following code

@{ScoreList}=    Create List

The Complete Code is

*** Settings ***Library    Selenium2LibraryLibrary    Collections*** Keywords ***Parent Routine    @{ScoreList}=    Create List    : For    ${i}     IN RANGE    1    5    \    Append To List    ${ScoreList}    ${i}    #\    Some other manipulation    :FOR  ${item}  IN  @{ScoreList}    \    log to console    ${item}*** Test Cases ***Sample Test Case    [Documentation]   Simple test for Collection    Parent Routine