robotframework - Robotframework - 有没有办法用“不应该包含”检查价值并在失败时继续?
问题描述
我正在从命令生成输出,我想在继续之前检查潜在的 4 个错误
例子
不应包含 ${output} error1 msg=你有错误 1
不应包含 ${output} error2 msg=you have error 2
不应包含 ${output} error3 msg=you have error 3
不应包含 ${output} error4 msg=you have error 4
目前,当 error1 与 true 匹配时,函数失败并中止,也就是致命错误,我希望它继续运行,即使遇到错误 1,也可能出现错误 3 或更多,也就是我希望它“失败”而不是“致命错误”
有什么办法吗?/也许可以使用其他方法?
解决方案
这些关键字之一应该是您需要的:
示例 1
Run Keyword And Continue On Failure should not contain ${output} error1 msg=you have error 1
示例 2
${status} Run Keyword And Return Status should not contain ${output} error1 msg=you have error 1
推荐阅读
- java - SQLite 外键为空 AndroidStudio
- python - 循环遍历一个数据框中的单个列与另一个数据框中的列比较使用熊猫在第一个数据框中创建新列
- android - 使用自定义排列显示 RecyclerView 列表项
- javascript - 如何用另一帧更改一帧的背景颜色?
- r - mapply 陷入无限循环
- mongodb - $group 获取数组中的所有相关数据
- outlook - Office.js 加载项显示对话框动态大小
- jmeter - Jmeter 和 webhook
- jquery - 在页面加载时显示第一个 div 并在我单击另一个锚点时隐藏它
- python - 无法从 Spacy 安装 es_core_news_sm