# Expect outside of acceptAlertButtonSelector button will not automatically be click

**URL:** <https://discuss.appium.io/t/expect-outside-of-acceptalertbuttonselector-button-will-not-automatically-be-click/42498>\
**Category:** Feature\
**Created:** [May 10, 2024, 7:04am UTC](https://discuss.appium.io/t/expect-outside-of-acceptalertbuttonselector-button-will-not-automatically-be-click/42498 "2024-05-10T07:04:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![connie.chenxiaojuan](https://discuss.appium.io/user_avatar/discuss.appium.io/connie.chenxiaojuan/32/13043_2.png) [@connie.chenxiaojuan](https://discuss.appium.io/u/connie.chenxiaojuan)\
**Post date:** [May 10, 2024, 7:04am UTC](https://discuss.appium.io/t/expect-outside-of-acceptalertbuttonselector-button-will-not-automatically-be-click/42498/1 "2024-05-10T07:04:14Z")

</div>

iOS: I set up acceptAlertButtonSelector, autoAcceptAlerts also need to set as true, but if it is beyond the scope of the selector button, will automatically be clicking.  
But I want that it can not be clicked.  
Can set a parameter to control it?

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [May 10, 2024, 7:49am UTC](https://discuss.appium.io/t/expect-outside-of-acceptalertbuttonselector-button-will-not-automatically-be-click/42498/2 "2024-05-10T07:49:39Z")

</div>

Why not set `acceptAlertButtonSelector` to empty value before needed screen and restore later?

---

<div class="post-metadata">

**Author:** ![connie.chenxiaojuan](https://discuss.appium.io/user_avatar/discuss.appium.io/connie.chenxiaojuan/32/13043_2.png) [@connie.chenxiaojuan](https://discuss.appium.io/u/connie.chenxiaojuan)\
**Post date:** [May 10, 2024, 7:55am UTC](https://discuss.appium.io/t/expect-outside-of-acceptalertbuttonselector-button-will-not-automatically-be-click/42498/3 "2024-05-10T07:55:07Z")

</div>

This is because an alert that sets the Selector (such as a permission popup) may appear on certain pages. But there are so many entry points to these pages, and I can’t script all of them to handle pop-ups.

---

<div class="post-metadata">

**Author:** ![connie.chenxiaojuan](https://discuss.appium.io/user_avatar/discuss.appium.io/connie.chenxiaojuan/32/13043_2.png) [@connie.chenxiaojuan](https://discuss.appium.io/u/connie.chenxiaojuan)\
**Post date:** [May 10, 2024, 7:59am UTC](https://discuss.appium.io/t/expect-outside-of-acceptalertbuttonselector-button-will-not-automatically-be-click/42498/4 "2024-05-10T07:59:06Z")

</div>

My expectation is that except for the pop-up button of the selector I set, other buttons should not be clicked automatically.
