Skip to content

Commit

Permalink
docs: update headless chrome/puppeteer example
Browse files Browse the repository at this point in the history
Puppeteer v0.11 has released a new method to obtain the locally
installed chromium path. This commit cleans up the code example to use
that new method.
  • Loading branch information
rogeriopvl committed Sep 22, 2017
1 parent 8d3e5fa commit 6f41067
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ $ npm install puppeteer --save-dev

```js
// karma.conf.js

const ChromiumRevision = require('puppeteer/package.json').puppeteer.chromium_revision
const Downloader = require('puppeteer/utils/ChromiumDownloader')
const revisionInfo = Downloader.revisionInfo(Downloader.currentPlatform(), ChromiumRevision)

process.env.CHROME_BIN = revisionInfo.executablePath
process.env.CHROME_BIN = require('puppeteer').executablePath()

module.exports = function(config) {
config.set({
Expand Down

0 comments on commit 6f41067

Please sign in to comment.