我试图在机器人框架中杀死进程,尽管日志上说进程被杀死了,但我仍然能够看到process调用的命令提示符。
在Suite Teardown中是否存在要关闭调用的命令提示符的问题?
*** Settings ***
Library Process
Suite Setup Generic Suite Setup
Suite TearDown Terminate All Processes kill=True
*** Test Cases ***
login
*** Keywords ***
Generic Suite Setup
#This is invoking cmd
#when i run this , got error as mentioned below
Run Process appium -p 4723
Run Process appium -p 4750
#I tried to include cmd , no error but can't see the cmd getting invoked
Run Process cmd appium -p 4750我的python版本:2.7.14 pybot版本: 3.0.2
删除start & "cmd"后,将得到错误
父套件安装失败:WindowsError: Error 2系统找不到指定的文件
在环境变量中设置Appium路径。
发布于 2017-11-07 12:10:37
当您使用Start Process时,您在命令行上使用的每个参数都需要是机器人中的参数。例如,如果在命令行中键入appium -p 4723,那么在机器人中可以这样做:
Start process appium -p 4723(注:在"process“、"appium”、"-p“和”4723“之间有两个空格)
当您这样做时,机器人将查看PATH环境变量中的文件夹,以便找到一个名为"appium“(或windows上的"appium.exe”)的程序。如果您得到错误“找不到指定的文件”,这通常意味着您试图运行的程序不在您路径中的文件夹中。这也可能意味着程序没有安装,或者您拼错了应用程序名,但我假设在这种情况下这两种情况都不正确。
最简单的解决方案是找到appium可执行文件所在的位置,然后使用完整的路径作为Run Process的第一个参数(例如:Run Process C:/the/path/to/appium.exe -p 4723)。
https://stackoverflow.com/questions/47091374
复制相似问题