# Unable to close a pop-up in Chrome

**URL:** <https://forum.katalon.com/t/unable-to-close-a-pop-up-in-chrome/58941>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [October 6, 2021, 2:40pm UTC](https://forum.katalon.com/t/unable-to-close-a-pop-up-in-chrome/58941 "2021-10-06T14:40:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marie.piolot](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marie.piolot/32/16104_2.png) [@marie.piolot](https://forum.katalon.com/u/marie.piolot)\
**Post date:** [October 6, 2021, 2:40pm UTC](https://forum.katalon.com/t/unable-to-close-a-pop-up-in-chrome/58941/1 "2021-10-06T14:40:03Z")

</div>

Hello,  
My colleague and I are confronted to a problem. We are automating with Katalon Studio the tests of a web interface on an emulated (by Android Studio) Pixel 4. During the test, we need to access the camera of the emulated phone. We see a pop-up asking us if we want to allow or block the software from accessing the camera. This pop-up just can’t be closed. We have tried:

1. acceptAlert() and dismissAlert(): com.kms.katalon.core.exception.StepFailedException: No alert found
2. edit Project → Settings → Desired capabilities → Mobile → Android : prefs = {autoGrantPermissions = true}, args = {profile.default\_content\_setting\_values.media\_stream\_camera = 1} → does not close the pop-up
3. click on the object: it is not a capturable object.
4. switchToWindowIndex(1): no such window

I am clueless. Any ideas ? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [October 6, 2021, 4:20pm UTC](https://forum.katalon.com/t/unable-to-close-a-pop-up-in-chrome/58941/2 "2021-10-06T16:20:22Z")

</div>

Is there a **title** on the pop-up that you can use?

`WebUI.switchToWindowTitle("popup title")`

---

<div class="post-metadata">

**Author:** ![marie.piolot](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marie.piolot/32/16104_2.png) [@marie.piolot](https://forum.katalon.com/u/marie.piolot)\
**Post date:** [October 7, 2021, 7:17am UTC](https://forum.katalon.com/t/unable-to-close-a-pop-up-in-chrome/58941/3 "2021-10-07T07:17:21Z")

</div>

Hello,  
Thanks for your reply. I’m afraid not…
