【发布时间】:2016-04-08 11:56:52
【问题描述】:
我正在为我的 iPad 应用程序进行 UIAutomation 测试。当一个用户与其他用户共享文件时,会收到 APNS 通知。我需要查看那里有哪些通知,然后点击这些通知。我对此做了很多研究,但我无法成功。有什么方法可以实现吗?
【问题讨论】:
标签: ios apple-push-notifications ui-automation ios-ui-automation
我正在为我的 iPad 应用程序进行 UIAutomation 测试。当一个用户与其他用户共享文件时,会收到 APNS 通知。我需要查看那里有哪些通知,然后点击这些通知。我对此做了很多研究,但我无法成功。有什么方法可以实现吗?
【问题讨论】:
标签: ios apple-push-notifications ui-automation ios-ui-automation
您可以通过 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;
}
【讨论】: