[英]How to execute the commands in the Terminal using robot framework?
I want to execute the below commands in the Terminal using Robot Framework step by step.我想使用机器人框架逐步在终端中执行以下命令。 Any advice on how to go about it?关于如何 go 关于它的任何建议?
1. ssh -o ProxyCommand\='ssh -W %h:%p xx.xx.xx.xx' xx.xvb.xyz.wq
2. password
3. sudo su - pentaho
4. cd pentaho/design-tools/data-integration/
5. sh kitchen.sh -file\=/ebs/pentaho/history/etljob.kjb
You can try using Process library .您可以尝试使用Process library 。
Keyword like Run Process seems promising:像Run Process这样的关键字似乎很有希望:
*** Settings ***
Library Process
*** Test Cases ***
Python Tiny Program
${result} = Run Process python -c print('Hello, world!')
Log ${result.stdout}
${result}
will be an object, you can use various properties like stdout
, stderr
, rc
and others. ${result}
将是 object,您可以使用各种属性,如stdout
、 stderr
、 rc
等。 It's described in the official doc .它在官方文档中有所描述。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.