Using Selenium Java in my automation framework and trying to download PDF from Chrome but specify name of that file is there an existing option?
here is my code:
System.setProperty("webdriver.chrome.driver", "resources/drivers/chromedriver.exe");
ChromeOptions options = new ChromeOptions();
HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("profile.default_content_settings.popups", 0);
chromePrefs.put("plugins.always_open_pdf_externally", true);
chromePrefs.put("download.default_directory", "C:");
options.setExperimentalOption("prefs", chromePrefs);
driver = new ChromeDriver(options);