selenium - 机器人框架:如果任何关键字在循环内失败,则继续 FOR 循环
问题描述
在机器人框架中,即使循环内的任何关键字失败,我也想继续循环。例如,我有如下所示的代码:
FOR ${member} IN @{all data members}
Keyword 1 ${member}
Keyword 2 ${member}
..............
Keyword n ${member}
END
如果任何关键字(例如关键字 2)失败,FOR 循环执行应该继续。
解决方案
您可以Run Keyword And Continue On Failure
在每个关键字之前使用关键字,也可以使用关键字Run Keyword And Return Status
并手动处理错误。
推荐阅读
- python - 在 sqlite3 中使用“AUTOINCREMENT”
- c# - 解构器歧义的位置模式匹配
- javascript - 在 JavaScript 中,当必须缩小文件时省略分号是否安全?
- javascript - 一些图像即使存在也没有加载到反应应用程序中
- c++ - Eigen:在子矩阵上重复操作的有效方法
- firebase - Firebase 按存在的孩子排序
- amazon-web-services - Terraform 分离并重新附加 ebs 卷
- swift - 您可以强制字典返回非可选或断言吗?
- sql-server - 透视 SQL 服务器结果
- java - 来自系统属性的 spring.datasource.password 不起作用