我想使用机器人框架逐步在终端中执行以下命令。关于如何去做的任何建议?
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
我想使用机器人框架逐步在终端中执行以下命令。关于如何去做的任何建议?
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
您可以尝试使用Process library。
像Run Process这样的关键字似乎很有希望:
*** Settings ***
Library Process
*** Test Cases ***
Python Tiny Program
${result} = Run Process python -c print('Hello, world!')
Log ${result.stdout}
${result}
将是一个对象,您可以使用各种属性,如,stdout
等。它在官方文档中有所描述。stderr
rc