Linux 中的机器人框架 [英] Robot Frame work in Linux
本文介绍了Linux 中的机器人框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在机器人框架的帮助下获取在linux中执行的命令的状态.例如如果使用这个:
How to get the status of the command which is executed in linux with the help of robot frame work. For example If use this:
SSHLibrary open Connection (server)
SSHLibrary login xxxxx xxxxx
${1111}= Write ${command}
${2222}= Read delay=5s
在上面的脚本中如何获取我已执行并存储在 ${1111} 变量中的命令的状态,
In the above script how to get the status of the command I have executed and stored in the ${1111} var,
例如;如果命令执行通过,我必须获得状态为 0 否则为 1
Eg; If command executed pass the I have to get a status with 0 otherwise 1
推荐答案
SSHLibrary 文档给出了这个例子:
${rc}= Execute Command echo Success guaranteed. return_stdout=False return_rc=True
Should Be Equal ${rc} ${0}
这篇关于Linux 中的机器人框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文