zhuluquan 发布的帖子
launchApp("QQ");\nsleep(1500);\n关闭应用();\nfunction 关闭应用() {\n let packageName = currentPackage();\n app.openAppSetting(packageName);\n text(app.getAppName(packageName)).waitFor(); \n let is_sure = textMatches(/(.强.|.停.|.结.|.行.)/).findOne();\n if (is_sure.enabled()) {\n textMatches(/(.强.|.停.|.结.|.行.)/).findOne().click();\n textMatches(/(.确.|.定.)/).findOne().click();\n log(app.getAppName(packageName) + "应用已被关闭");\n sleep(1000);\n back();\n } else {\n log(app.getAppName(packageName) + "应用不能被正常关闭或不在后台运行");\n back();\n }\n}