简体   繁体   English

机器人框架:如果任何关键字在循环内失败,则继续 FOR 循环

[英]Robot Framework: Continue FOR loop if any keyword fails inside the loop

In the robot framework, I want to continue For Loop even if any keyword fails inside the Loop.在机器人框架中,即使循环内的任何关键字失败,我也想继续循环。 For example, I have the code as shown below:例如,我有如下所示的代码:

FOR    ${member}    IN    @{all data members}
      Keyword 1   ${member}
      Keyword 2   ${member}
      ..............
      Keyword n   ${member}
END

If any keyword (eg Keyword 2) fails, the FOR loop execution should continue.如果任何关键字(例如关键字 2)失败,FOR 循环执行应该继续。

You could use keyword Run Keyword And Continue On Failure before each keyword or use keyword Run Keyword And Return Status and manually handle errors.您可以在每个关键字之前使用关键字Run Keyword And Continue On Failure或使用关键字Run Keyword And Return Status并手动处理错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Selenium Robot 框架中使用具有多个条件的“Exit For Loop IF”关键字 - How to use 'Exit For Loop IF' keyword with multiple condition in Selenium Robot framework 在机器人框架中退出 For 循环 - Exit For Loop in Robot Framework Selenium机器人框架中的For循环 - For Loop in Selenium Robot Framework Robot Framework Selenium For loop to click on nav links fails with a StaleElementReferenceException - Robot Framework Selenium For loop to click on nav links fails with a StaleElementReferenceException 在 Robot Framework 中找不到 IN 关键字。 如何在不使用 IN 关键字的情况下使用 for 循环? - Unable to find IN keyword in Robot Framework. How to use for loop without using IN keyword? 异常后继续使用while循环进行for循环? - Continue for loop with while loop inside after exception? 尝试在机器人框架中进行 For 循环时语法无效 - Invalid Syntax when trying to For Loop in Robot Framework 机器人框架中的 IF ELSE [关键字作为条件] - IF ELSE in robot framework [Keyword as a condition] 我可以从循环内的回调继续 for 循环吗? - Can I continue the for loop from callback inside the loop? [Python]Robot Framework中的Selenium关键字点击<a>标签</a>内的span role="button" - [Python]Selenium keyword in Robot Framework to click span role="button" inside <a> tag
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM