0

How to disable chrome notification popups

I have tried that below code but its not working

ChromeOptions option = new ChromeOptions();
option.addArguments("--disable-notifications");
option.addArguments("--disable-popup-blocking");
driver = new ChromeDriver(option);

2 Answers 2

0

Try:

options.addArguments("--disable-web-security");

See - How do i stop the blocking of redirects in my chromedriver?

Sign up to request clarification or add additional context in comments.

Comments

-1

I hope you do not care much about the session, cookies, or cache data. If not then that particular notification can be disabled in incognito mode. So for that you can alter your code as below

ChromeOptions option = new ChromeOptions();
option.addArguments("--incognito");//This would open the Chrome in incognito mode and it would block most of the popups
driver = new ChromeDriver(option);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.