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
15
votes
4 answers
Programmatically capturing AJAX traffic with headless Chrome
Chrome officially supports running the browser in headless mode (including programmatic control via the Puppeteer API and/or the CRI library).
I've searched through the documentation, but I haven't found how to programmatically capture the AJAX…

Andrei
- 1,723
- 1
- 16
- 27
15
votes
1 answer
"Refused to connect" using ChromeDriver, Capybara & Docker Compose
I'm trying to make the move from PhantomJS to Headless Chrome and have run into a bit of a snag. For local testing, I'm using Docker Compose to get all dependent services up and running. To provision Google Chrome, I'm using an image that bundles…

Wilhelm Murdoch
- 1,806
- 1
- 22
- 42
14
votes
6 answers
Headless Chrome Node API and Puppeteer installation
Throughout the process of installation chrome headless on a clean ubuntu 18.04 i faced quite a few issues. The setup guide on github is not sufficient for a clean ubuntu 18.04
The following are some errors and answer / solutions to setting up…

CodeGuru
- 3,645
- 14
- 55
- 99
14
votes
1 answer
How would puppeteer wait for all redirects
I have a puppeteer project which needs to submit a form and then wait for the next page. The problem is that to get to the next page, the site would make around 3-4 redirects and only then will start loading the actual content.
It seems Puppeteer is…

Roman
- 4,443
- 14
- 56
- 81
14
votes
4 answers
Puppeteer: How to select a dropdown option based on its text?
In Puppeteer, we can select an option of a dropdown by providing the value as a parameter:
page.select('select#idOfSelect', 'optionValue');
Is there a function to select an option based on its text and not from its value?

Pipo
- 5,170
- 7
- 33
- 66
14
votes
8 answers
Headless Chrome to print pdf
I am trying to use Headless feature of the Chrome to convert a html to pdf. However, i am not getting output at all. Console doesn't show any error as well. I am running below commands in my windows m/c.
chrome --headless --disable-gpu…

user2580925
- 811
- 2
- 8
- 14
14
votes
2 answers
How to get console.log output in Terminal via Headless Chrome Runtime.evaluate
I am following this issue post here:
https://github.com/cyrus-and/chrome-remote-interface/issues/105
But I cannot seem to get console.log output in the Mac Terminal. It's probably inside the Chrome Devtools window which I don't see.
So how do I get…

HP.
- 19,226
- 53
- 154
- 253
14
votes
4 answers
How to use headless chrome with capybara and selenium
Chrome version: 59.0.3071.104
Using Cucumber, Capybara, Selenium to implement automation testing with Headless Chrome.
features/support/env.rb
require 'rubygems'
require 'capybara/cucumber'
Capybara.register_driver :selenium_chrome do |app|
…

YourAboutMeIsBlank
- 1,787
- 3
- 18
- 27
13
votes
1 answer
Headless browser image quality - Headless chrome, phantom js, slimmer js
I'm looking for more information on what takes place under the hood in headless browsers. I've been working with different headless browsers in the past such as slimmerJS, Phantom.js and Headless Chrome, with the purpose of taking screenshots in…

Bruno Smaldone
- 208
- 3
- 11
13
votes
1 answer
Headless Chrome Terminates
When trying to run Headless Chrome on both mac and linux, it fails with the following error
Chrome --headless --disable-gpu https://www.yahoo.com
[0505/072239.922334:ERROR:browser_process_sub_thread.cc(217)] Waited 5 ms for network service
I'm…

Anshuul Kai
- 3,876
- 2
- 27
- 48
13
votes
3 answers
Is Chrome installation needed or only chromedriver when using Selenium?
I've tried to search, but haven't found a definitive answer. On Windows Server 2016 WITHOUT Chrome Browser actually installed. I downloaded the correct "chromedriver.exe" and placed it in "D:\Apps\chromedriver.exe". I have added to my environment…

Source Matters
- 1,110
- 2
- 15
- 35
13
votes
4 answers
Possible to Get Puppeteer Audio Feed and/or Input Audio Directly to Puppeteer?
I want to input WAV or MP3 into puppeteer as a microphone, however while in headless the application is muted, so I was wondering if there was a way to get input directly into the browser.
I am also wondering if it's possible to get a feed of audio…

david elepen
- 131
- 1
- 3
13
votes
3 answers
Puppeteer get 3rd-party cookies
How can I get 3rd-party cookies from a website using Puppeteer?
For first party, I know I can use:
await page.cookies()

Piotr Wu
- 1,362
- 3
- 14
- 31
13
votes
3 answers
how to prevent Chrome headless from loading images
I am running a test in headless chrome and part of it I want to prevent the browser from loading the images on the page, the page must be a data url and not a normal page.
I am using headless chrome with the next start command:
chrome --headless…

Wazime
- 1,423
- 1
- 18
- 26
13
votes
3 answers
How to run Headless Chrome in Azure Cloud Service or Azure Functions?
I am trying to use Headless Chrome to generate a PDF file from a complex HTML file (contains images, SVGs, etc.). I am able to use wkhtmltopdf.exe on Cloud Service (Windows) to generate simple PDF file, but I really need Chrome to produce PDFs as…

Martin
- 39,309
- 62
- 192
- 278