我想执行以下步骤:
打开我的机器人测试包运行的同一个ubuntu机器的终端并执行一些命令.
编写了一个Robot框架测试用例,如下所示:
*** Settings ***
Library Telnet
*** Testcases ***
testcase1
open connection 127.0.0.1
write gnome terminal
write ifconfig -a eth0
Run Code Online (Sandbox Code Playgroud)
但它的抛出"Errno 111 - 连接拒绝"错误.
如果有人对此有所了解,请指导我.
感谢您的帮助.
如果您实际上不需要打开终端窗口,则robot具有一个Process库,允许您通过Run process关键字运行外部命令.例如:
*** Settings ***
| Library | Process
*** Test cases ***
| Example
| | Run process | ifconfig | -a | eth0
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11499 次 |
| 最近记录: |