# How to handle Android native alert on a webview?

**URL:** <https://discuss.appium.io/t/how-to-handle-android-native-alert-on-a-webview/28229>\
**Category:** Support\
**Created:** [October 13, 2019, 3:16pm UTC](https://discuss.appium.io/t/how-to-handle-android-native-alert-on-a-webview/28229 "2019-10-13T15:16:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chestnutchen](https://discuss.appium.io/user_avatar/discuss.appium.io/chestnutchen/32/6542_2.png) [@chestnutchen](https://discuss.appium.io/u/chestnutchen)\
**Post date:** [October 13, 2019, 3:16pm UTC](https://discuss.appium.io/t/how-to-handle-android-native-alert-on-a-webview/28229/1 "2019-10-13T15:16:06Z")

</div>

There is an Android native alert above a webview. And I try the API(using appium nodejs) below but it doesn’t work.

> driver.acceptAlert()

And then any next commands will receive an UnexpectedAlertOpen error. How can I close this popup?

---

<div class="post-metadata">

**Author:** ![Bilal\_Jarwan](https://discuss.appium.io/user_avatar/discuss.appium.io/bilal_jarwan/32/6182_2.png) [@Bilal\_Jarwan](https://discuss.appium.io/u/Bilal_Jarwan)\
**Post date:** [October 13, 2019, 4:11pm UTC](https://discuss.appium.io/t/how-to-handle-android-native-alert-on-a-webview/28229/2 "2019-10-13T16:11:21Z")

</div>

Please add a screenshot from appium
