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; 
}