[英]Unable to Set Suite Variable for multiple variables in robot framework using "AND" condition
I'm trying Set Suite Variable for multiple variables in Robot Framework (RIDE tool, keyword driven) using "AND" condition, but not able to.我正在尝试使用“AND”条件为 Robot Framework(RIDE 工具,关键字驱动)中的多个变量设置套件变量,但不能。
The below is my script:下面是我的脚本:
Set Suite Variable ${username} AND
${password} AND
${URL} AND
${Browser}
Error im facing:我面临的错误:
Invalid variable syntax '${username} AND'.
无效的变量语法“${username} AND”。
pip list:点列表:
robotframework 3.1.2
[...]
selenium 3.8.1
Do let me know if any missing from my end.如果有任何遗漏,请告诉我。 Thanks in advance!
提前致谢!
You can only set one variable at a time.一次只能设置一个变量。 Set suite variable doesn't support AND.
设置套件变量不支持 AND。
Since Set Suite Variable
does not support setting multiple variables at once but you still want to do it in a single line I would try with Run Keywords
instead:由于
Set Suite Variable
不支持一次设置多个变量,但您仍然想在一行中进行设置,我会尝试使用Run Keywords
:
Run Keywords Set Suite Variable ${VAR1} value1 AND Set Suite Variable ${VAR2} value2
But probably the cleanest way would be to have a keyword where your variables are set但可能最干净的方法是设置一个关键字来设置变量
*** Keywords ***
Set Variables
Set Suite Variable ${VAR1} value1
Set Suite Variable ${VAR2} value2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.