0

I am doing automation using Appium and I came across 2 major problems.

  1. How to dismiss SEND/PUSH Notifications popup on iOS which is system popup

  2. If I install the application and uninstalled it and then again installed, It is launching the app with already user signed in. How can I avoid it to launch signed in instead of Showing on Sign in.

To cancel the PUSH Notification, I am using autoAcceptAlerts, which works but not always.

Prateek.Naik
  • 556
  • 4
  • 18
born2Learn
  • 1,253
  • 5
  • 14
  • 25
  • If I am understanding your question correct, after uninstalling and installing the application also you are logged in, is it? – Naman Feb 29 '16 at 18:29
  • yes, it is, But I think I can handle that now. 1 major problem currently is Notification – born2Learn Feb 29 '16 at 19:03

1 Answers1

2

Though ideally uninstall and install shall not have leave the user logged in. But you can try this to logout the user after every relaunch, you can use ((AppiumDriver) driver).resetApp() for resetting the application so that it launches back with the login page.

For dismissing the alerts autoAcceptAlerts should work. Another way to tweak it is to use ((IOSDriver)driver).SwitchTo().Alert().Accept();. You can also try your hands on some methods mentioned here.

Naman
  • 27,789
  • 26
  • 218
  • 353