0
我想在执行UiAutomator测试时卸载一个apk。uiDevice.executeShellCommand(“pm uninstall”+ Constants.APP_PACKAGE);不从shell返回输出字符串
我正在使用下面的命令,它工作正常。它从设备上卸载应用程序。
String output = uiDevice.executeShellCommand("pm uninstall " + Constants.APP_PACKAGE);
但是,当我检查输出字符串的值是空白。我想检查应用程序是否已卸载,或者不要执行脚本中的后续步骤。在这种情况下如何获得executeShellCommand的输出?