Skip to main content
zoran0002
November 3, 2021
Question

How to block notifications poping up in Chrome

  • November 3, 2021
  • 10 replies
  • 0 views

Hello!

I wonder if it is possible to tell the Chrome browser to allow or block notifications while using it with RPA?

In Selenium/Java  I would use something like this:

ChromeOptions options = new ChromeOptions();

options.AddUserProfilePreference("profile.default_content_setting_values.notifications",2); /* or 1 depending if I want to block or allow notifications */

IWebDriver driver = new ChromeDriver(options);

Best regards!

    10 replies

    danny.verb
    November 3, 2021

    When you say 'Notifications' are you refering to browser alerts? Can you post a screenshot of one of these notifications?

    zoran0002
    zoran0002Author
    November 3, 2021



    I can not identify this window using Selenium or Xpath and I need to allow or block the notifications to proceed to the site.

    danny.verb
    November 4, 2021

    Using the 'driver' you can handle and submit alerts