Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why End error in For Loop Error with Robot Framework

Why I am getting for loop must have closing END though I have already added it
The first function is working as expected but the second one is throwing error kindly suggest whats wrong here

*** Settings ***
Library          SeleniumLibrary                          # importing selenium library



*** Variables ***
@{ROBOTS}=    Bender    Johnny5    Terminator    Robocop

***Test Cases***
somefunc1
    FOR                 ${i}         IN RANGE         999999
    Exit For Loop If    ${i} == 9
    Log                 ${i}
    Log To Console      ${i}         stream=STDOUT    no_newline=False
    END
    Log                 Exited

Create List and Loop

    FOR    ${robot}    IN    @{ROBOTS}
    Log    ${robot}
    End

Output I am getting is

somefunc1                                                             0
1
2
3
4
5
6
7
8
somefunc1                                                             | PASS |
------------------------------------------------------------------------------
Create List and Loop                                                  | FAIL |
FOR loop must have closing END.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

you did not write the last end in caps. Shouldn’t it be END ?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading