Handeling Android Permission Warnings

Hi! I am automating native app but as Android 6.0 shows permission warnings so I want to know that is there a direct way to accept/ dismiss the system permission warning without using condition and conventional way to find element and clicking on that?

	DesiredCapabilities capabilities = new DesiredCapabilities();
	capabilities.setCapability("waitForAppScript", "$.delay(3000);$.acceptAlert();");

Try , it might help , although i used it for iOS.

Hi Sargis,

It doesn’t seem to be working on Android. :pensive:


Found one more option

capabilities.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);

Try , let me know if it is ok.

@Sargis_Azaryan Thanks! But this also doesn’t seem to be working for native app, may be this would be for Hybride or WebApp. Did you try it yourself?

Nope. Found that it is only for iOS , didn’t found something for android …