在UIAutomation测试iOS中访问APNS通知

时间:2013-05-07 19:58:41

标签: ios apple-push-notifications ui-automation ios-ui-automation

我正在为我的iPad应用程序进行UIAutomation测试。当一个用户与其他用户共享文件时,会收到APNS通知。我需要查看有哪些通知,然后点按这些通知。我对此做了很多研究,但我无法成功。有没有办法实现它?

1 个答案:

答案 0 :(得分:0)

您可以按标题属性分隔它们。 例如:

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