How to dismiss "push notification" in iOS app using Appium


This is know factor when we use iOS application the time we launch if application has push notification feature there will be pop up seen as soon as launching app saying like “Don’t allow” or “Allow” push notification. I want solution to handle it.

Because the time I launch app using iOS real device and simulator I can run code only after app is properly launched if I wait for pop up to dismiss automatically using “waitforappscript” or “auto alert” it doesn’t receive and after this appium stops showing error like “no elements found”

I need help where launching app through appium and hitting run code in cmd prompt receives any code to dismiss push notification pop up

Try this, this might work…This one accept the notification.


Give this as the one of the capability
capabilities.SetCapability(“autoAcceptAlerts”, true);

@Archana_Raghuram - Did you try with capabilities suggested by @pavanbachu ?