0

I'm doing automation of downloading email from outlook.com,
I'm using selenium with python and chrome driver.

Everything is working as expected, I'm unable to disable this prompt
"outlook.office365.com wants to Open email links".
Here's the screen-snip of the same, how to disable it or stop from popping?

outlook.office365.com wants to Open email links.

This pops-up 7/10 times, because of this whole automation get affected.

I tried almost everything to resolve it, no solution. Here's the snippet for the same:

options = webdriver.ChromeOptions()
options.add_argument("--kiosk")
options.add_argument("disable-infobars")
options.add_argument("--disable-extensions")
options.add_argument("--disable-notifications")
options.add_argument('--disable-popup-blocking')
options.add_experimental_option('excludeSwitches', ['enable-automation'])
prefs = {'credentials_enable_service': False,
         'profile.password_manager_enabled': False,
         'profile.default_content_setting_values.popups': False,
         'profile.default_content_setting_values.notifications': False,
         'profile.default_content_setting_values.automatic_downloads': 1,
         'profile.default_content_setting_values': {"handlers": False},
         'download.default_directory': attachment_download_directory}
options.add_experimental_option("prefs", prefs)
driver = webdriver.Chrome(options=options)
driver.set_window_size(960, 800)
Greg Burghardt
  • 17,900
  • 9
  • 49
  • 92
  • https://stackoverflow.com/questions/55587025/how-to-disable-a-reload-site-changes-you-made-may-not-be-saved-popup-for-pyt – Tchaikovsky May 15 '23 at 13:44
  • `options.add_argument('--disable-popup-blocking')` already added in my snippet. – Sinku Kumar May 17 '23 at 04:52
  • Does this answer your question? [How to disable a "Reload site? Changes you made may not be saved" popup for (python) selenium tests in chrome?](https://stackoverflow.com/questions/55587025/how-to-disable-a-reload-site-changes-you-made-may-not-be-saved-popup-for-pyt) – Gastón Schabas May 18 '23 at 21:48
  • No, this is not what I'm looking for. – Sinku Kumar May 22 '23 at 04:42

0 Answers0