# Handle dynamic popup on the application

**URL:** <https://forum.katalon.com/t/handle-dynamic-popup-on-the-application/130384>\
**Category:** Web Testing\
**Tags:** web-testing\
**Created:** [May 6, 2024, 3:22pm UTC](https://forum.katalon.com/t/handle-dynamic-popup-on-the-application/130384 "2024-05-06T15:22:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sudheer\_D\_J](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sudheer_d_j/32/16104_2.png) [@Sudheer\_D\_J](https://forum.katalon.com/u/Sudheer_D_J)\
**Post date:** [May 6, 2024, 3:22pm UTC](https://forum.katalon.com/t/handle-dynamic-popup-on-the-application/130384/1 "2024-05-06T15:22:29Z")

</div>

Dynamic popup displayed on the application. Need to handle it throughout the script execution. How to do it?

Whenever it is displayed it should close it and continue further.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [May 6, 2024, 3:22pm UTC](https://forum.katalon.com/t/handle-dynamic-popup-on-the-application/130384/2 "2024-05-06T15:22:30Z")

</div>

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

---

<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:** [May 6, 2024, 3:40pm UTC](https://forum.katalon.com/t/handle-dynamic-popup-on-the-application/130384/3 "2024-05-06T15:40:35Z")

</div>

You can start by reading the below, but giving us more information about the “popup” can allow us to better tailor our answers:

> [@Dynamic pop up handling](http://forum.katalon.com/t/dynamic-pop-up-handling/9017):
>
> How to handle the pop up dynamically? I am automating a website and i don’t know when the pop up will appear ,in this case how should i handle those pop ups?

> **[Solving Pop-up dialog issue with Katalon Studio | Katalon Docs](https://docs.katalon.com/katalon-studio/keywords/using-keywords-in-katalon-studio/web-testing/solving-pop-up-dialog-issue-with-katalon-studio)**
>
> When performing automation testing, you may sometimes deal with pop-up dialog issue that needs to be handled differently from normal test objects. This tutorial shows you how to deal with pop-up controls.

---

<div class="post-metadata">

**Author:** ![Sudheer\_D\_J](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sudheer_d_j/32/16104_2.png) [@Sudheer\_D\_J](https://forum.katalon.com/u/Sudheer_D_J)\
**Post date:** [May 7, 2024, 8:34am UTC](https://forum.katalon.com/t/handle-dynamic-popup-on-the-application/130384/4 "2024-05-07T08:34:31Z")

</div>

Hey, Thanks for the article.

I looking for something like a dynamic popup, ex: Some advertisement popup kind of thing. Which sometimes may come or may not come on the screen.

---

<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:** [May 7, 2024, 10:12am UTC](https://forum.katalon.com/t/handle-dynamic-popup-on-the-application/130384/5 "2024-05-07T10:12:32Z")

</div>

Maybe something like the below link on the page the pop-up occurs on.

> [@Unpredictable Cookie Banner](http://forum.katalon.com/t/unpredictable-cookie-banner/103122/4):
>
> Perhaps you can create a Keyword that surrounds your click statement with a “try/catch” block that is looking for an ElementClickInterceptedException and then do some processing like you want. So, instead of just using, WebUI.click(findTestObject('...')) you use the Keyword, maybe like: CustomKeyword.'com.Tools.performClick(findTestObject('...')) @Keyword public void performClick(TestObject tobj) { try { WebUI.click(tobj) catch (ElementClickInterceptedException) { "I…
