You may need to use the Alert class like this.
Alert alert = driver.switchto().alert
alert.accept(); // This will click the allow button
alert.dismiss(); // Or use this to click Deny button
Or handle it from the id
of the ok button.
driver.findElement(By.id(“android:id/ok_button”)).click();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.