1 messaggio dal 02 marzo 2023
Chrome is not downloading any file when runned in headless mode! It was working perfectly fine till last week! Suddenly it started to fail! I've tried with different OS, different Selenium version, still no luck!

Sometimes it does download on my computer, but not on Github Actions and AWS!

Have a look at My setup:

HashMap<String, Object> headlessChromePrefs = new HashMap<String, Object>();
            ChromeOptions headlessChromeOption = new ChromeOptions();
            DesiredCapabilities capabilities = new DesiredCapabilities();
            headlessChromeOption.addArguments("--headless=new");
            headlessChromeOption.addArguments("--disable-gpu");
            headlessChromeOption.addArguments("--disable-dev-shm-usage");
            headlessChromeOption.addArguments("--no-sandbox");
            headlessChromeOption.addArguments("--window-size=1920,1200");
            headlessChromePrefs.put("download.default_directory", downloadDirectory);
            headlessChromePrefs.put("download.prompt_for_download", false);
            headlessChromeOption.setExperimentalOption("prefs", headlessChromePrefs);
            capabilities.setCapability(ChromeOptions.CAPABILITY, headlessChromeOption);
            headlessChromeOption.merge(capabilities);
            driver = new ChromeDriver(headlessChromeOption);


Environment: Java 11, Selenium 4.4.0

Please help me find the issue! Thanks team!!

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.