问题
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
In the above script how to get the status of the command I have executed and stored in the ${1111} var,
Eg; If command executed pass the I have to get a status with 0 otherwise 1
回答1:
You need to use Execute command instead of Write
The SSHLibrary documentation gives this example:
${rc}= Execute Command echo Success guaranteed. return_stdout=False return_rc=True
Should Be Equal ${rc} ${0}
来源:https://stackoverflow.com/questions/45101647/robot-frame-work-in-linux