【问题标题】:access APNS notifications in UIAutomation testing iOS在 UIAutomation 测试 iOS 中访问 APNS 通知
【发布时间】:2016-04-08 11:56:52
【问题描述】:

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

【问题讨论】:

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


    【解决方案1】:

    您可以通过 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;
    }
    

    【讨论】:

      猜你喜欢
      • 2016-08-28
      • 1970-01-01
      • 1970-01-01
      • 2012-05-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多