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?
.
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)