robor  framework中,我们可以使用Exit  For  Loop  If关键字来中断一个for循环,

 

例如,list2有a、b、c、d    4个元素,循环遍历输出这些元素,当输出遇到元素c时候,跳出这个循环。

 

 

@{list2}                                                        Create  List                                  a                                           b                                              c                                                        d

:For                                                              ${value}                                        in                                          @{list2}

                                                                     log                                               ${value} 

                                                                     Exit  For  Loop  If                        ’${value} ‘==‘c’

 

相关文章:

  • 2022-12-23
  • 2021-05-27
  • 2021-06-14
  • 2021-10-18
  • 2022-12-23
  • 2021-09-17
  • 2022-12-23
  • 2021-05-29
猜你喜欢
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-10-15
相关资源
相似解决方案