目前在我的 BeforeClass appium 自动化中,我想清除设备通知。我正在为 android
做以下事情 List<MobileElement> clearButtons = appium.findElementsById("com.android.systemui:id/clear_all");
if(!clearButtons.isEmpty()) {
MobileElement clearButton = clearButtons.get(0);
boolean clearButtonEnabled = Boolean.parseBoolean(clearButton.getAttribute("enabled"));
if(clearButtonEnabled) {
LOG.info("CLEAR notifications.");
AppiumHelper.tap(appium, clearButton);
}
}
它工作得很好,但对于 IOS,我仍然不知道最好的方法是什么,请问有人可以帮我解决这个问题吗?