How to handle device permission popups?

How to handle device permission popups?

Hey Ian,

You can handle the permission pop on mobile browsers using the below capability or script:

caps.setCapability("autoGrantPermissions", "true");

OR

driver.findElement(By.xpath(".//android.widget.Button[@text='Allow']")).click();