Unable to access chrome internal pages in headless mode

171 views
Skip to first unread message

chaudhary...@gmail.com

unread,
Jun 18, 2020, 2:23:50 AM6/18/20
to ChromeDriver Users
Hello!

All chrome internal pages (e.g., chrome://downloads) are showing blank in headless mode and working in normal mode.


Code to reproduce (Java)
webdriver.get("chrome://downloads/");
System.out.println(webdriver.getPageSource());


Output
<html><head></head><body></body></html>

Output Without headless argument (and nothing else changed)
chrome://downloads page is successfully opening
able to get 1533 lines as source


Details
Selenium Java: 3.141.59
ChromedriverVersion: 83.0.4103.39
Using remote web driver
OS: MacOS 10.15.4


Chrome Options
options.addArguments("headless");
options.addArguments("disable-notifications");
options.addArguments("disable-application-cache");
options.addArguments("disable-features=IsolateOrigins,site-per-process"); //for network calls of iframes
options.addArguments("no-sandbox"); //for running in docker without chrome user
options.addArguments("disable-dev-shm-usage"); //write shared memory files into /tmp instead of /dev/shm
options.addArguments("user-agent="+"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36");

options.setExperimentalOption("w3c", false);
options.setExperimentalOption("excludeSwitches", new String[]{"enable-automation"});


It's important for me to open downloads page and I don't want to use file reader in downloads folder or anything.
Please help!!

John Chen

unread,
Jun 18, 2020, 12:30:24 PM6/18/20
to chaudhary...@gmail.com, ChromeDriver Users
Most chrome internal pages are not implemented in headless mode. This is a limitation of headless Chrome itself, and is not related to ChromeDriver. If you need a particular internal page available in headless Chrome, please file a feature request at https://crbug.com/.

--
You received this message because you are subscribed to the Google Groups "ChromeDriver Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromedriver-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chromedriver-users/3c2ae428-9ba6-466b-9a3b-c856824b2c47o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages