# How can I handle pop up message?

**URL:** <https://forum.robotframework.org/t/how-can-i-handle-pop-up-message/2108>\
**Category:** Robot Framework\
**Created:** [8 July 2021 14:04 UTC](https://forum.robotframework.org/t/how-can-i-handle-pop-up-message/2108 "2021-07-08T14:04:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naina](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@Naina](https://forum.robotframework.org/u/Naina)\
**Post date:** [8 July 2021 14:04 UTC](https://forum.robotframework.org/t/how-can-i-handle-pop-up-message/2108/1 "2021-07-08T14:04:15Z")

</div>

I used- ’ handle alert accept ’ to select the option ‘Allow’ . But I am getting an error message like ‘Alert not found in 5 seconds’. Can anyone help me to fix this error?

![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/2f961d89c9901b335219634038e3e9ff172172f3.png)

---

<div class="post-metadata">

**Author:** ![Wolfe1](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/wolfe1/32/3386_2.png) [@Wolfe1](https://forum.robotframework.org/u/Wolfe1)\
**Post date:** [8 July 2021 14:20 UTC](https://forum.robotframework.org/t/how-can-i-handle-pop-up-message/2108/2 "2021-07-08T14:20:31Z")

</div>

Not familiar with this myself but it seems you need to provide some arguments to the web driver to prevent this from appearing in the first place:

> <https://stackoverflow.com/questions/53500111/how-to-access-microphonecamera-in-robot-framework>

---

<div class="post-metadata">

**Author:** ![Wolfe1](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/wolfe1/32/3386_2.png) [@Wolfe1](https://forum.robotframework.org/u/Wolfe1)\
**Post date:** [8 July 2021 14:21 UTC](https://forum.robotframework.org/t/how-can-i-handle-pop-up-message/2108/3 "2021-07-08T14:21:52Z")

</div>

Also this thread seems to have a similar issue so perhaps the information there could help:

> [@How to handle browser notification using robot framework](https://forum.robotframework.org/t/how-to-handle-browser-notification-using-robot-framework/2100):
>
> This below piece of code has been tried and its not working. Launch Browser ${SiteURL} ${Browser} Enter Username ${User} Enter Password ${Pwd} Login ${options}= Evaluate sys.modules[‘selenium.webdriver.chrome.options’].Options() sys Call Method ${options} add\_argument --disable-notifications Call Method ${options} add\_argument --disable-infobars Call Method ${options} add\_argument start-maximized Call Method ${options} add\_argument --d…

---

<div class="post-metadata">

**Author:** ![nyxalexa](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/nyxalexa/32/1726_2.png) [@nyxalexa](https://forum.robotframework.org/u/nyxalexa)\
**Post date:** [8 February 2023 00:17 UTC](https://forum.robotframework.org/t/how-can-i-handle-pop-up-message/2108/4 "2023-02-08T00:17:22Z")

</div>

Hello @Naina have you resolved your issue? I have the same issue.

---

<div class="post-metadata">

**Author:** ![Dineshsampath05](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@Dineshsampath05](https://forum.robotframework.org/u/Dineshsampath05)\
**Post date:** [8 February 2023 07:47 UTC](https://forum.robotframework.org/t/how-can-i-handle-pop-up-message/2108/5 "2023-02-08T07:47:21Z")

</div>

Hi @nyxalexa

Try to sort it out by using the below keyword

hand alert (check this keyword in the below link)

[https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert)

---

<div class="post-metadata">

**Author:** ![grarun11](https://avatars.discourse-cdn.com/v4/letter/g/8e7dd6/32.png) [@grarun11](https://forum.robotframework.org/u/grarun11)\
**Post date:** [14 September 2023 21:08 UTC](https://forum.robotframework.org/t/how-can-i-handle-pop-up-message/2108/6 "2023-09-14T21:08:17Z")

</div>

Did anyone handle this kind popup? I have location popup (Know your location - Allow or block). Handle alert not working.

---

<div class="post-metadata">

**Author:** ![twindecker](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@twindecker](https://forum.robotframework.org/u/twindecker)\
**Post date:** [12 April 2024 15:19 UTC](https://forum.robotframework.org/t/how-can-i-handle-pop-up-message/2108/7 "2024-04-12T15:19:07Z")

</div>

Maybe try the following? This worked for my Chrome allow notifications pop up, I used the 2 to disable

you can do the following:

${options}= Evaluate sys.modules[‘selenium.webdriver’].ChromeOptions() sys

${prefs}= Create Dictionary profile.default\_content\_setting\_values.notifications=2

Call Method ${options} add\_experimental\_option prefs ${prefs}

Open Browser ${URL} ${BROWSER} options=${options}

With profile.default\_content\_setting\_values.notifications=2 you disable all notifications, with 1 you can enable them.
