I found two examples on Stack Overflow on disabling notifications, but neither of these has worked for me: push notifications are still showing when the browser is launched. Here is the code that I've tried:
Example 1:
browser_profile = webdriver.FirefoxProfile()
browser_profile.set_preference("dom.webnotifications.enabled", False)
driver = webdriver.Firefox(firefox_profile=browser_profile)
Example 2:
from selenium.webdriver.firefox.options import Options
options = Options()
options.set_preference("dom.webnotifications.enabled", False)
browser = webdriver.Firefox(firefox_options=options)
Notification
