简体   繁体   中英

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?

 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 .

Keyword like Run Process seems promising:

*** 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. It's described in the official doc .

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM