我用来启动 Appium 服务器的命令:
node appium --address 127.0.0.1 --port 4723 --session-override --no-reset --platform-name Android --platform-version 23 --automation-name Appium
如何通过命令行停止服务器?
Ctrl+c
或
在终端中运行
pkill -9 -f appium
。
如果您希望以编程方式执行此操作,请参阅http://discuss.appium.io/t/launching-and-stopping-appium-server-programmtically/700。
如果您有很多 appium 实例正在运行并且不想一次停止它们,请尝试以下命令,它将立即关闭所有 htem:
/usr/bin/killall -KILL node
运行
ps -A | grep appium
以查看有多少个进程,如果太多则命令 aobve 来了。
在 Windows 终端中,以下命令将终止运行 Node 的 Windows 进程
taskkill /F /IM node.exe