Handle android push notification using appium

Push notification is a message pop up to any mobile device and can be sent from any app that is installed on device.

There are situation we need to test or verify if push notification is working as expected for the app we are currently testing.

Appium has the ability to handle push notifications, even we can

  • count no. of notification we have received
  • Read the notification message.
  • verify if correct message content received.

Appium provides a method openNotifications() which will open the notification panel and reads the content, let’s see the implementation

I am taking “API Demos” application to create a push notification and then verify the message content

You will notice the notification count will be 1 [in this case we have created one notification] and the content [basically the title of message]

Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our facebook:qavalidation.com, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *