How do I check for a notification in the notification shadow?

We are testing an iOS app that works like this:

  • If the user sends the application to the background while a task is running, the application alerts the user to resume the task.
  • Clicking on this notification brings the application back to the foreground and resumes the task.
  • The notification text contains some content (like numbers) that needs to be parsed with the expected values.

I'm using the UI Automation Tools method deactivateAppForDuration

to nudge the app towards the background - this works great. On my real test devices, the app is actually pushed into the background.

The problem is notification detection - I've read the UI Automation documentation and there doesn't seem to be a way to do this. The only alert handling construct I've found is one onAlert()

that only works well for alerts.

So - has anyone found a way to handle notification shadow notifications using UI Automation?

+3


source to share





All Articles