How to block notifications poping up in Chrome

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!

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Hi mukeshr0001,

    Thanks for your advice, but unfortunately it's not working. I have set those settings options, and they do work when I open the website manually, but when a robot opens the website those settings are not used.

    I couldn't find any mention of this kind of behaviour in documentation.

    I am not sure if I need to import those settings while initializing browser with a robot or do some other code in order for this to work, but I am trying to exhaust low-code approach and options before I give in to the "old" ways and write a code that will do exactly what I want to do.

    If I'll have to write a code to solve this eventually, I'll post a sample here. I'd like to test low-code options first to learn the advantages and weaknesses of the Appian RPA low code modules.

    Please do post any other suggestions or links you might have regarding this topic.

    Best regards!