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 Mukesh,

    Thanks for the suggestion. I "solved" the problem using low code image recognition module, but it is too slow. It takes 10-15 seconds to identify Allow button on the screen so I am trying to go through Extend RPA tutorial and see how can I use Java code in a robot. 

    Unfortunately there are some issues with my environment and repositories, so I can not use Java code until those issues are solved with Appian support.

  • To improve the speed, I recommend using the smallest possible image with the lowest possible tolerance

  • Could you check from browser settings as there is way to disable these kind of popups also.

    For reference-

    www.howtogeek.com/.../

  • Hi Danny,

    I appreciate your advice. I did that already because it was mentioned in the documentation.

    One of Appian support engineers told me to try to select the image (if possible) so the pixel in the top left corner of the image has a colour that is different than the colour of the background. This is because searching for image starts by comparing the colour of this pixel to the colour of the pixels of the area we are searching in.

    The initial image had white pixel in top left corner and most of the website background was white so this is probably why the initial search was so slow. It would be great if this advice is written in the documentation (better phrased than what I wrote, of course).

    I changed the image so the top left pixel is blue and now I have recognition times mostly less than half of a second which is good.

    Unfortunately I still can't "click" on a button I found, at least not in a first try, but I'll open another thread for this issue.

  • 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!