I am not able to recognize that iOS has displayed the system alert. I just knew that after the "enable notifications" button was pressed that the iOS generated message would appear and, only as an experiment, immediately looked for a button named "Allow". This, of course, is not a valid test, just me experimenting that I could tap the "Allow" button if it appeared. Code: "public MobileElementWrapper enableNotifications() { return new ClickableElement(MobileElement) iosDriver.findElementById( id: "enable notify button"), elementName: "button" + TAG, UserType.ALL_USERS); ".
After the above method executes I look for for an "Allow" button and using ClickableElement. I'm using Java to run tests.