【问题标题】:Run commands on terminal using robot framework process使用机器人框架进程在终端上运行命令
【发布时间】:2019-05-24 17:26:37
【问题描述】:

我正在尝试使用 adb devices -l 获取附加的 android 设备列表。

但我不太确定如何使用进程运行命令

Error given is --> FileNotFoundError, No such file or directory.

我想我错过了语法,如果有人可以看看这个,我将不胜感激。

*** Settings ***
Library     Process
Suite Teardown      Terminate All Processes     kill=True

*** Test Cases ***
Example
    Run Process   adb devices -l

当我添加 shell = True,

错误消息变为 --> 预期至少有 1 个未命名的参数,得到 0。不太确定我应该输入什么参数。

    Run Process   adb devices -l    shell=True

参考:http://robotframework.org/robotframework/latest/libraries/Process.html

【问题讨论】:

    标签: robotframework


    【解决方案1】:

    愚蠢的错误。这是一个间距问题。

    我只需要在代码之间按两次 tab 2 就可以了。

    Run Process       adb devices -l      shell=True
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-05-13
      • 1970-01-01
      • 1970-01-01
      • 2014-03-02
      • 2022-07-29
      • 2011-02-20
      • 1970-01-01
      相关资源
      最近更新 更多