[英]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当满足多个条件时,我需要在 Selenium Robot 框架中退出 FOR LOOP
I am trying something like this where it should exit FOR LOOP , if the below conditions are met:如果满足以下条件,我正在尝试这样的事情,它应该退出 FOR LOOP :
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 .您需要注意 Robot Framework 使用空格分隔格式。
Ie Robot Framework will separate the and
operator as a new argument since there is more than 2 spaces between the conditions.即 Robot Framework 会将
and
运算符作为新参数分开,因为条件之间有 2 个以上的空格。
That's why Robot Framework think you give two arguments instead of one and the execution will fail.这就是 Robot Framework 认为您提供两个参数而不是一个参数并且执行将失败的原因。
Please try make it one space.请尝试将其留一个空格。
Exit For Loop If '${Name}'=='Adam' and '${Age}'=='27'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.