FOR loop contains no keywords

81 views
Skip to first unread message

vbharatraj

unread,
Apr 25, 2023, 3:55:05 AM4/25/23
to robotframework-users
FOR    ${I}    IN RANGE    0    ${num_subscribers}
        Log To Console  "aaaaa",${olt_of_id}
        #FOR  ${subscriber}  IN ${subscriber_info}
        FOR    ${subscriber}    IN    @{subscriber_info}
            Log    ${subscriber}
        END
        #${res1}=    Evaluate    '${olt_of_id}' == '${subscriber_info["location"]}'
        ${subscriber}=    Get From List    ${subscribers_info}    ${I}
        ${tag_subscriber_info}=    Get From Dictionary    ${subscriber}    tagInfo
        ${ServiceName}=    Get From Dictionary    ${tag_subscriber_info}    serviceName
        Log To Console  "ccccc",${ServiceName}
        ${res2}=    Evaluate    '${filter}' == '${ServiceName}'
        #If    "${res1}" and "${res2}"
        Log To Console  "ccccc",${res2}
        #IF    ${res2}
        #IF   ${res2}
        #${sub_info}=    Get From List    ${subscriber_info}    ${I}
        #Append To List    ${subscriber_list}    ${sub_info}
        #ELSE
        #Log To Console  "ddddd"
        #END
    END


Can anyone pls help, why the inner for loop is throwing error[FOR loop
contains no keywords]

Tatu Aalto

unread,
Apr 25, 2023, 3:57:16 AM4/25/23
to bhara...@gmail.com, robotframework-users
Hi

Nested for loops are nor supported directly. You need to hide the inner loop inside of a keyword.

-Tatu

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/ac930568-894b-42a9-989e-28c68214ecb5n%40googlegroups.com.

vbharatraj

unread,
Apr 25, 2023, 4:05:37 AM4/25/23
to robotframework-users
thanQ
Reply all
Reply to author
Forward
0 new messages