Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 1278 by kaira...@gmail.com: Exit For Loop doesn't work inside
Test Teardown.
http://code.google.com/p/robotframework/issues/detail?id=1278
Robot Framework 2.7.4 (Python 2.7.3 on win32)
***Test Teardown***
My Test Teardown
My For Loop Keyword
Do Something
***Test Case***
My Test Case
My For Loop Keyword
Do Something Else
***Keywords***
My For Loop Keyword
:FOR ${index} IN RANGE 1 10
Run Keyword If Page Contains ${index} Exit For Loop
I have a keyword, which contains a For loop. Execution of For loop is
stopped with Exit For Loop at certain point.
The same keyword is called both inside the test case, and in the test
teardown. When called inside the test case, Exit For Loop is working fine,
but in the test teardown node, I get the error 'Exit for loop without
enclosing for loop.' and the For loop isn't exited where it should.
If I move the For-loop from the teardown to the end of the test case, Exit
For Loop is again working fine and so is the rest of the teardown, so it
looks like the Exit For Loop doesn't somehow recognize the For loop when
it's placed inside test teardown.