revy
revy

Reputation: 4727

Accept all cookies automatically in Selenium Chrome driver

I am using Selenium with Chrome web driver in python. I would like to automatically accept all cookies when opening any website and get rid of the cookie notification like the following:

enter image description here

Is there any option in Chrome driver that allows to do that?

Upvotes: 0

Views: 5318

Answers (1)

Justin Lambert
Justin Lambert

Reputation: 978

 ChromeOptions options = new ChromeOptions();
    options.addArguments("--disable-notifications");
    options.addArguments("disable-infobars");

please use this

Upvotes: -1

Related Questions