How can I handle pop up message?

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

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:

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

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

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

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

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.