2

我正在爲我的iPad應用程序進行UIAutomation測試。當一個用戶與其他用戶共享文件時,會收到APNS通知。我需要看看有哪些通知,然後點擊這些通知。我在這方面做了大量的研究,但我無法取得成功。有什麼辦法可以實現它嗎?在UIAutomation測試中訪問APNS通知iOS

回答

0

您可以通過title屬性將它們分開。 例如:

UIATarget.onAlert = function onAlert(alert) { 
    var title = alert.name(); 

    //check by title, which alert is. 

    // test if your script should handle the alert, and if so, return true 
    // otherwise, return false to use the default handler 
    return false; 
}