Implementing Download Restrictions on Selenium Chromedriver

DownloadRestrictions

Allow download restrictions

Supported on:

Description:

How to implement it on Selenium:

 ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<>();
prefs.put("download_restrictions", 3);
options.setExperimentalOption("prefs", prefs);
WebDriver driver = new ChromeDriver(options);

Reference:

Geek Culture

Proud to geek out. Follow to join our +1.5M monthly readers.