mardi 23 octobre 2018

iOS Push Notifications UITesting

I am creating automation tests and testing it on multiples devices. I have an issue while testing on iOS 10.

In my tests I send a Push Notification. It is correctly displayed on devices.

I wait for existence of that push the following way :

    XCUIElement *push = [XCUIElement pushNotificationWithTitle:message.title message:message.body];

if (![push waitForExistenceWithTimeout:30]) {
    XCTFail(@"Push not visible");
}

My issue is that my "waitForExistenceWithTimeout" methods always returns false on iOS 10 and perfectly works on iOS 11.

Why ?

Aucun commentaire:

Enregistrer un commentaire