How to write a loop while in Robot Framework

后端 未结 3 762
醉梦人生
醉梦人生 2021-02-13 14:48

I make my first simple test case, and I have one problem.

Is it possible write a loop in Robot Framework?

I want to retrieve the value from the address and the a

3条回答
  •  清歌不尽
    2021-02-13 15:43

    Robot Framework does not have a while loop. You must use the FOR-loop and "exit for loop if" keywords to exit. It will run in a finite time, but if you select a large enough number in range, it is close enough for practical purposes.

    *** Test Cases ***
    For Test
        FOR    ${i}    IN RANGE    999999
               Exit For Loop If    ${i} == 9
               Log    ${i}
        END
        Log    Exited
    

提交回复
热议问题