# Catch the browser popup and click button inside

**URL:** <https://forum.katalon.com/t/catch-the-browser-popup-and-click-button-inside/61835>\
**Category:** Web Testing\
**Tags:** katalon-recorder\
**Created:** [January 21, 2022, 7:28am UTC](https://forum.katalon.com/t/catch-the-browser-popup-and-click-button-inside/61835 "2022-01-21T07:28:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![amadese](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amadese/32/21141_2.png) [@amadese](https://forum.katalon.com/u/amadese)\
**Post date:** [January 21, 2022, 7:28am UTC](https://forum.katalon.com/t/catch-the-browser-popup-and-click-button-inside/61835/1 "2022-01-21T07:28:23Z")

</div>

Hi,

I’m trying to catch the browser pop in Chrome after trying to leave a form.  
Indeed when I click on the button “Close” in the form (after filling some fields), a popup appears asking if I’m sure to want to leave the form:

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/b/1/b1ec3d27e34d26c96b03cff11c2090543ab045d6.png)

I tried to catch the pop-up and the action when clicking the buttons inside (OK and Cancel) but I didn’t succeed. I tried these steps:

But when I tried to execute it, it’s failled from the step _ **assertConfirmationPresent** _, the step is not executed. Could you please help me to do that ?

Could you please help me to do that ?

---

<div class="post-metadata">

**Author:** ![amadese](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amadese/32/21141_2.png) [@amadese](https://forum.katalon.com/u/amadese)\
**Post date:** [February 14, 2022, 11:01am UTC](https://forum.katalon.com/t/catch-the-browser-popup-and-click-button-inside/61835/2 "2022-02-14T11:01:49Z")

</div>

@ThanhTo Sorry to disturb you, but do you know if it exists a way with KR to check the browser pop-up and interact with that 🙂

Thanks for your help

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [February 15, 2022, 7:36am UTC](https://forum.katalon.com/t/catch-the-browser-popup-and-click-button-inside/61835/3 "2022-02-15T07:36:50Z")

</div>

Hi @amadese

Can you try to use `storeAlert` to store the text of the alert into a variable and print that out to see what it prints?

---

<div class="post-metadata">

**Author:** ![amadese](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amadese/32/21141_2.png) [@amadese](https://forum.katalon.com/u/amadese)\
**Post date:** [March 28, 2022, 11:31am UTC](https://forum.katalon.com/t/catch-the-browser-popup-and-click-button-inside/61835/5 "2022-03-28T11:31:49Z")

</div>

> [@ThanhTo](#):
>
> Can you try to use `storeAlert` to store the text of the alert into a variable and print that out to see what it prints?

@ThanhTo I cannot catch the path of the native pop-up of the browser. As shown in the topic I recorded the actions and the result is in the topic. But I cannot do anything else.  
When I executed again the test, the step on the click of the button in the pop-up is not executed by the tool.

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/b/5/b52039a1f09f67d2a49e2e9f5f1123bab9cd63e5.png)

---

<div class="post-metadata">

**Author:** ![uyen.do](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/uyen.do/32/20464_2.png) [@uyen.do](https://forum.katalon.com/u/uyen.do)\
**Post date:** [April 4, 2022, 10:17am UTC](https://forum.katalon.com/t/catch-the-browser-popup-and-click-button-inside/61835/6 "2022-04-04T10:17:58Z")

</div>

Hi there,

We will fix that issue asap. Thanks for letting us know. Apologies for the inconvenience.

---

<div class="post-metadata">

**Author:** ![amadese](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amadese/32/21141_2.png) [@amadese](https://forum.katalon.com/u/amadese)\
**Post date:** [August 9, 2022, 8:48am UTC](https://forum.katalon.com/t/catch-the-browser-popup-and-click-button-inside/61835/8 "2022-08-09T08:48:50Z")

</div>

Dear Team, @ThanhTo and @uyen.do , Do you have any news about my issue regarding to the test of button actions and text inside the native browser popup after leaving a form ?
