• Node: 8.7.0
  • Puppeteer: 0.12.0
  • Windows: 7 Professional / service pack: 6.1.7601 Service Pack 1 Build 7601

The current company I am working for has me using a typical Windows machine within a typical corporate environment.

Wanting to quickly start writing some end-to-end tests for the web application I am working on I decided to give Puppeteer a try. However, when trying to run the example:

let browser;
  .then(b => {
    browser = b;
    return browser.newPage();
  .then(page => page.goto('https://www.google.com'))
  .then(response => {
    console.log('Page loaded with status code: ' + response.status);

a Chromium instance would appear on the screen, so not headless, and sit there doing nothing until the script timed out.

What ended up working was to first manually start up the Chrome instance (as detailed here https://www.sitepen.com/blog/2017/10/04/browser-automation-with-puppeteer)

/c/Program Files (x86)/Google/Chrome/Application$ ./chrome.exe --headless --remote-debugging-port=9222 --disable-gpu
DevTools listening on ws://

And then use puppeteer.connect() instead of puppeteer.launch().

puppeteer.connect({browserWSEndpoint : 'ws://'});

And things started working smoothly.

(Also shout-out to Git Bash which I have found to be a smoother Unix-like command-line interface for Windows than Cygwin).