在Appium Java中如何清除IOS设备中的通知列表

问题描述 投票:0回答:0

目前在我的 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,我仍然不知道最好的方法是什么,请问有人可以帮我解决这个问题吗?

java ios push-notification appium appium-ios
© www.soinside.com 2019 - 2024. All rights reserved.