I want to automate something but getting stuck whenever a notifications arrive in chrome with allow and block options. How to handle this notification?
I've tried to click on the body or hit escape button through selenium but it's not working.
I want to automate something but getting stuck whenever a notifications arrive in chrome with allow and block options. How to handle this notification?
I've tried to click on the body or hit escape button through selenium but it's not working.
Check if any alert exists using selenium with python will show you how to switch to the alert. From there you can accept or decline it.
WebDriverWait(browser, 3).until(EC.alert_is_present(),
'Timed out waiting for alert')
alert = browser.switch_to.alert
alert.accept() [or alert.dismiss()]