selenium - How to use 'Exit For Loop IF' keyword with multiple condition in Selenium Robot framework
问题描述
I need to exit FOR LOOP in Selenium Robot framework when multiple conditions are met
I am trying something like this where it should exit FOR LOOP , if the below conditions are met:
Exit For Loop IF '${Name}'=='Adam' and '${Age}'=='27'
Error:
Keyword 'BuiltIn.Exit For Loop If' expected 1 argument, got 2.
解决方案
You need to be careful that Robot Framework use space separated format.
I.e. Robot Framework will separate the and
operator as a new argument since there is more than 2 spaces between the conditions.
That's why Robot Framework think you give two arguments instead of one and the execution will fail.
Please try make it one space.
Exit For Loop If '${Name}'=='Adam' and '${Age}'=='27'
推荐阅读
- android - 是什么导致 Google Play 开发者控制台中出现此警告:“我们检测到您的应用正在使用旧版本的 Google Play 开发者 API”
- php - 为什么添加标题后无法获取 POSTFIELDS?
- react-native - 如何在本机反应中跨组件全局调用一种方法
- c# - 类型列表参数的正确命名约定
- c# - 将委托转换为 lambda?
- r - 具有两组 x 标签的 Ggplot 分组柱形图
- windows - 如何重命名子文件夹或 zip 文件中的文本文件
- ruby - 使用现有文件 url 更新 CarrierWave 对象
- python - 在 python 3 上使用 setuptools 构建 dist 包
- arrays - Swift数组只打印最后一个元素