{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.bairwell.com/#organization","name":"Bairwell Ltd","url":"https://www.bairwell.com/","sameAs":["https://www.facebook.com/bairwell/","https://www.linkedin.com/company/bairwell","https://twitter.com/bairwell"],"logo":{"@type":"ImageObject","@id":"https://www.bairwell.com/#logo","url":"https://www.bairwell.com/wp-content/uploads/2017/02/bairwell.png","width":400,"height":400,"caption":"Bairwell Ltd"},"image":{"@id":"https://www.bairwell.com/#logo"}},{"@type":"WebSite","@id":"https://www.bairwell.com/#website","url":"https://www.bairwell.com/","name":"Bairwell PHP and WordPress Development","publisher":{"@id":"https://www.bairwell.com/#organization"},"potentialAction":{"@type":"SearchAction","target":"https://www.bairwell.com/?s={search_term_string}","query-input":"required name=search_term_string"}},{"@type":"ImageObject","@id":"https://www.bairwell.com/project/chrome-headless-driver/#primaryimage","url":"https://www.bairwell.com/wp-content/uploads/2017/07/propulsion1.png","width":2292,"height":1428},{"@type":"WebPage","@id":"https://www.bairwell.com/project/chrome-headless-driver/#webpage","url":"https://www.bairwell.com/project/chrome-headless-driver/","inLanguage":"en-GB","name":"Chrome Headless Driver | Bairwell PHP and WordPress Development","isPartOf":{"@id":"https://www.bairwell.com/#website"},"primaryImageOfPage":{"@id":"https://www.bairwell.com/project/chrome-headless-driver/#primaryimage"},"datePublished":"2017-05-28T15:43:30+00:00","dateModified":"2017-07-28T15:48:45+00:00"}]}

Chrome Headless Driver

Using Chrome Dev Tools with Node JS to emulate user interactions on a web page and extract the data, screenshots and page source.

A client had the requirement that they wanted to be able to capture screenshots of web pages, emulate user interactions (such as scrolling, key presses and mouse interactions), record all images and other assets transferred and have all the data returned to a PHP backend.

For this end, an approach to use NodeJS with the Google Chrome Headless web driver kit was made ( a previous incarnation of the project was using PhantomJS) with excellent results.

Date

May 2017

Technologies

Chrome Headless

NodeJS

Want us to build or design your site?