How to handle notifications popups in Safari?

WebUI.acceptAlert does not work.

The Notification level alert actually pops up on the browser.
59%20AM

But on the error report, It displays an error message, no alert found.

I have tried to add disable-infobar / notification as the desired capabilities on the project setting which does not work on Safari. Because this is not much introduction of desired capabilities setting online. I tried to use the same format as chrome. But it returns to Open the browser with “null” Url. I set the Url as global Url and definitely redirected to the site before I set the desired capabilities.

This is chrome:

This is safari:

Please advise, thank you.

as long as it gave two options to choose from, that doesnt look like an alert for me. usualy, allert has only one button(sometime none). just saying …

Try WebUI.closeWindowIndex(1) or WebUI.SwitchWindowIndex(1)

Hi @Dave_Evers

Thanks for your advice. I have tried both closeWindowIndex or Switch. Both fail the test.

Please refer to the screenshot

This is not an Alert. The Alert code you have will not work.

Question: Is the popup coming from the AUT or the browser?

HI @Russ_Thomas

I am not sure. When I do manual testing It still pops up

I think it is coming from the browser. because The text on Safari (…wants to ) is different from Chrome (… would like to )

replication steps:

  1. open the browser
  2. Then you will see the geolocation pop up
  3. maximize the window

hope this can provide more info. and Pls feel free to ask.

Try this stuff

https://duckduckgo.com/?q=desired+capabilities+notifications&t=ffab&ia=web

Hi @Russ_Thomas
Is there any way to disable the notification on Safari?

Maybe. That’s why I said…

And when you figure it out, please post back the answer.

See if this helps…

Hi @Russ_Thomas

Thank you for the patience!!

This really helps!! Sorry for taking your time, I need to improve my solution-searching skill.

Best wishes

1 Like