Chrome Headless is the headless mode of Chrome and Chromium used for automation, testing, and CI scenarios. Use this tag for questions related to the usage of Chrome Headless and the DevTools protocol.
Questions tagged [google-chrome-headless]
1156 questions
13
votes
1 answer
Can chrome headless browser be used to save the complete web page with resources?
I am looking to use the chrome headless browser to replicate the 'Save As' functionality to save the complete web page with all its resources. Is there a way to do this? I tried the --print-to-pdf and --screenshot options and looking to explore the…

uday kiran
- 299
- 1
- 2
- 9
13
votes
6 answers
ElementNotVisibleException when use headless Chrome browser
When I run test script in headless mode chrome browser, element link is not visible, is not able to do linkElement.click(). in head mode is everything OK. All other info are in stacktrace.
Anyone knows what to do, please?
StackTrace:
ERROR…

Ghost
- 309
- 1
- 4
- 10
13
votes
4 answers
chromedriver headless alerts
I have this issue with selenium webdriver tests with chromedriver. Although I can run tests succesfully when using Chrome browser I can't run the same tests in headless mode.
I cannot handle the Js alerts. Actually when taking a screenshot it seems…

Alex Pas
- 148
- 1
- 2
- 7
13
votes
3 answers
How to install chrome (headless) in linux
I have an AWS EC2 running linux redhad. Is there a way to install the latest Chrome v59 on it so that I can run it in headless mode just like PhantomJS? All the resources I can find in google are about how to install it in ubuntu which has a UI. My…

Lee Le
- 337
- 1
- 4
- 10
12
votes
2 answers
How to save mobile screenshot using Headless Google Chrome with Selenium
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
mobile_emulation = {
"deviceMetrics": {"width": 360, "height": 640, "pixelRatio": 3.0},
…

goku
- 183
- 14
12
votes
1 answer
How to configure CHROME_BIN path in Jenkins env variable for Headless Chrome
I'm working on basic Angular project and I'm able to run the test with karma and Jasmin on my Windows with headless chrome. But Jenkins says that No binary for ChromeHeadless browser on your platform, so the question is how to configure the…

TheParam
- 10,113
- 4
- 40
- 51
12
votes
3 answers
running Chrome in headless mode
To run chrome in headless mode, I did
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\
Chrome"
chrome --remote-debugging-port=9222 --disable-gpu --headless
in console, But, I got this…

Expert wanna be
- 10,218
- 26
- 105
- 158
12
votes
3 answers
Puppeteer Generate PDF from multiple HTML strings
I am using Puppeteer to generate PDF files from HTML strings.
Reading the documentation, I found two ways of generating the PDF files:
First, passing an url and call the goto method as follows:
page.goto('https://example.com');
page.pdf({format:…

Juan Rivillas
- 897
- 2
- 9
- 23
12
votes
2 answers
How to pass userDataDir profile folder to Puppeteer
I want to pass a custom profile to Puppeteer.
To start I've tried to pass my real Google Chrome profile:
const browser = await puppeteer.launch({
userDataDir: '/Users/[USERNAME]/Library/Application Support/Google/Chrome/Default',
headless:…

Giorgio
- 13,129
- 12
- 48
- 75
12
votes
4 answers
Getting DOM node text with Puppeteer and headless Chrome
I'm trying to use headless Chrome and Puppeteer to run our Javascript tests, but I can't extract the results from the page. Based on this answer, it looks like I should use page.evaluate(). That section even has an example that looks like what I…

Don Kirkby
- 53,582
- 27
- 205
- 286
12
votes
4 answers
How to set window-size to fullscreen for headless-chrome using chrome options?
When executing UI tests, I get an error that selenium doesn't support automatic window resizing for chromedriver, which results in tests failing.
Is there a way to set this using chrome-options for headless-chrome ?
I have tried the following,…

hemanik
- 965
- 3
- 14
- 33
11
votes
6 answers
How to enable WebGL in Headless Chrome >= 96 within selenium-docker project to run Chrome inside a docker container without XVFB
I'm using selenium-docker project to run chrome inside a docker container, without XVFB (START_XVFB=false).
I want to use webgl support. With chrome v95 and lower…

cocorossello
- 1,289
- 1
- 17
- 30
11
votes
1 answer
Chrome headless immediately exits with --repl flag
I'm trying to use the chrome.exe headless REPL, but it seems to immediately exit.
I'm currently on Windows 7 Pro 64-bit
Chrome Version 72.0.3626.121
Command Used:
$ chrome.exe --headless --disable-gpu --enable-logging --no-sandbox --repl…

Kevin Brock
- 131
- 8
11
votes
3 answers
How to set screen size for chrome headless system test in rails 5.1?
In order to work with and test a new responsive frontend for my site, I'm trying to use Rails' new system tests (specs) with javascript and Chrome headless. I cannot figure out a way to set the screen size of the browser in the spec, though.
Here's…

croceldon
- 4,511
- 11
- 57
- 92
10
votes
1 answer
How to Supress "Floss manager not present, cannot set Floss enable/disable."
I got warning from bluez_dbus_manager.cc(247). How to supress it?
$ google-chrome-stable --headless --single-process --disable-audio-output --dump-dom https://domains.google.com/checkip
[1224/012030.647481:WARNING:bluez_dbus_manager.cc(247)] Floss…

にゃあ
- 111
- 1
- 5