{"_id":"@axelhzf/puppeteer-screencast","_rev":"3-cb6ed6b11fb7d77807d096b8efde0c54","name":"@axelhzf/puppeteer-screencast","dist-tags":{"latest":"1.3.0-post"},"versions":{"0.10.1-alpha":{"name":"@axelhzf/puppeteer-screencast","version":"0.10.1-alpha","description":"A high-level API to control headless Chrome over the DevTools Protocol","main":"index.js","repository":{"type":"git","url":"git+https://github.com/GoogleChrome/puppeteer.git"},"engines":{"node":">=6.4.0"},"scripts":{"unit":"jasmine test/test.js","debug-unit":"DEBUG_TEST=true node --inspect-brk ./node_modules/.bin/jasmine test/test.js","test-phantom":"python third_party/phantomjs/test/run-tests.py","test-doclint":"jasmine utils/doclint/check_public_api/test/test.js && jasmine utils/doclint/preprocessor/test.js","test":"npm run lint --silent && npm run coverage && npm run test-phantom && npm run test-doclint && npm run test-node6","install":"node install.js","lint":"([ \"$CI\" = true ] && eslint --quiet -f codeframe . || eslint .) && npm run doc","doc":"node utils/doclint/cli.js","coverage":"COVERAGE=true npm run unit","node6":"node utils/node6-transform/index.js","test-node6":"jasmine utils/node6-transform/test/test.js","build":"npm run node6","node6-sanity":"jasmine test/sanity.js"},"author":{"name":"The Chromium Authors"},"license":"SEE LICENSE IN LICENSE","dependencies":{"debug":"^2.6.8","extract-zip":"^1.6.5","https-proxy-agent":"^2.1.0","mime":"^1.3.4","progress":"^2.0.0","proxy-from-env":"^1.0.0","rimraf":"^2.6.1","ws":"^3.0.0"},"puppeteer":{"chromium_revision":"496140"},"devDependencies":{"commonmark":"^0.27.0","deasync":"^0.1.9","eslint":"^4.0.0","esprima":"^4.0.0","jasmine":"^2.6.0","markdown-toc":"^1.1.0","minimist":"^1.2.0","ncp":"^2.0.0","pdfjs-dist":"^1.8.595","pixelmatch":"^4.0.2","pngjs":"^3.2.0","text-diff":"^1.0.1"},"gitHead":"18f7baf2ebafd998c925da4741c6e8c0e2f8d869","bugs":{"url":"https://github.com/GoogleChrome/puppeteer/issues"},"homepage":"https://github.com/GoogleChrome/puppeteer#readme","_id":"@axelhzf/puppeteer-screencast@0.10.1-alpha","_npmVersion":"5.8.0","_nodeVersion":"8.8.1","_npmUser":{"name":"axelhzf","email":"axelhzf@gmail.com"},"dist":{"integrity":"sha512-ZwpGXP5YKneADI7zYv2+pHTLR7KrwLM5r/dA+tYA5fKFjvyBIkU5Ulrkx1PYXvOF70NBcSSoIlwgj37jOfA4VA==","shasum":"3e1cb8319e53100bb792687a886cc10339ebd28a","tarball":"https://registry.npmjs.org/@axelhzf/puppeteer-screencast/-/puppeteer-screencast-0.10.1-alpha.tgz","fileCount":55,"unpackedSize":335497,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuKZaWJ8WNxNsv6QCP0vsGg9tzTuIEVRzWUsO8QAxAZAIhAM2UEIx7LUCCXngeaHivOOVqjOOwGEYYNXV1evtW4rKb"}]},"maintainers":[{"name":"axelhzf","email":"axelhzf@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/puppeteer-screencast_0.10.1-alpha_1523354365204_0.7537594552870188"},"_hasShrinkwrap":false},"1.3.0-post":{"name":"@axelhzf/puppeteer-screencast","version":"1.3.0-post","description":"A high-level API to control headless Chrome over the DevTools Protocol","main":"index.js","repository":{"type":"git","url":"git+https://github.com/GoogleChrome/puppeteer.git"},"engines":{"node":">=6.4.0"},"scripts":{"unit":"node test/test.js","debug-unit":"node --inspect-brk test/test.js","test-doclint":"node utils/doclint/check_public_api/test/test.js && node utils/doclint/preprocessor/test.js","test":"npm run lint --silent && npm run coverage && npm run test-doclint && npm run test-node6-transformer","install":"node install.js","lint":"([ \"$CI\" = true ] && eslint --quiet -f codeframe . || eslint .) && npm run tsc && npm run doc","doc":"node utils/doclint/cli.js","coverage":"cross-env COVERAGE=true npm run unit","test-node6-transformer":"node utils/node6-transform/test/test.js","build":"node utils/node6-transform/index.js","unit-node6":"node node6/test/test.js","tsc":"node utils/protocol-types-generator && tsc -p .","prepublishOnly":"npm run build","apply-next-version":"node utils/apply_next_version.js"},"author":{"name":"The Chromium Authors"},"license":"Apache-2.0","dependencies":{"debug":"^3.1.0","extract-zip":"^1.6.5","https-proxy-agent":"^2.1.0","mime":"^2.0.3","progress":"^2.0.0","proxy-from-env":"^1.0.0","rimraf":"^2.6.1","ws":"^3.0.0"},"puppeteer":{"chromium_revision":"551292"},"devDependencies":{"@types/debug":"0.0.30","@types/extract-zip":"^1.6.2","@types/mime":"^2.0.0","@types/node":"^8.0.26","@types/rimraf":"^2.0.2","@types/ws":"^3.0.2","commonmark":"^0.27.0","cross-env":"^5.0.5","eslint":"^4.0.0","esprima":"^4.0.0","markdown-toc":"^1.1.0","minimist":"^1.2.0","ncp":"^2.0.0","pdfjs-dist":"^1.8.595","pixelmatch":"^4.0.2","pngjs":"^3.3.3","text-diff":"^1.0.1","typescript":"~2.8.1"},"gitHead":"fb3d4152c506431df346ee13aebdedf94cec01a3","bugs":{"url":"https://github.com/GoogleChrome/puppeteer/issues"},"homepage":"https://github.com/GoogleChrome/puppeteer#readme","_id":"@axelhzf/puppeteer-screencast@1.3.0-post","_npmVersion":"5.8.0","_nodeVersion":"8.8.1","_npmUser":{"name":"axelhzf","email":"axelhzf@gmail.com"},"dist":{"integrity":"sha512-HU8qJvmxpBMF9Gh4p29u2341VqRlu6aVrnYWlnta041yNO9bFkSQsXJYkG3YRWj5wXE1h7LWByUYfGjPjAre+g==","shasum":"51f370754af123f19ee70434535174d5d4db271b","tarball":"https://registry.npmjs.org/@axelhzf/puppeteer-screencast/-/puppeteer-screencast-1.3.0-post.tgz","fileCount":79,"unpackedSize":588839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2bBSCRA9TVsSAnZWagAAtu0P/iu0IGcEdxXRi6+cJstn\ndDwItHA+kN/jVnfoZ+7lwqA6yIvXj5WU+lViME6vbrqVW6Zmk3Zeg9+DuU+w\nTdJK6mT2gPFjVs7lGBJZGBKi/SsO0+6NfK/BIiy4bTOYypU6KrkJmD/BBo5R\nYIEQlDSC/n9Bzrmer0H21yX0QGlR+Ow8gEJGkNj/UpL6zUYXHtq1APAUPHus\nNq+++aKlp3iNiVodKFDWDcVP5fOXLnXRgtcOV4Aeh7KLN4e5FMzFSIwpsNuZ\nTg7gSSXWg9IRjdPPSFYlS+UMXep7JCFUFPYbV1XxWiYBcbhswpK92s4eP6HI\nQChZkAXFDLrWqM5RnqCk1mKZqz4sll80JnKfd2JRsMfV0s4CENuhhcOWOBmU\nbOenDfMj6UqwtCxFAnNJylUZVYutNorKyyZXk9xF6eZ61ubwS4wpye4MTO99\n9RxBPfsIky6O8y9ixc3CDbenXMyvVsh/bYsznIopvY03kHaaBjgGy6+Vdi9R\nm/vVImLssfHaquN9doOJfsgY5LBXMmvV60wgcBgIZ7JWtS/Lg3TCc1zH3d1c\nbIsF/N67iVqhCeimJcAQTue04c5I4+eWc4rF0YwwFSR03RciPIeNGTjsZPfQ\nDS3XfoyDFse85y8sD9qWlcTUO4Bb6V3OQumkRitKZFUEGjTM+b33jPyqGMcr\nyN73\r\n=WvPM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRiC7Zb9IgI2HS3NWQfyix8mp0i+TSdXkQNOUr8A69wwIhAPSV0Cy2cpZB81x0q+7OaDXkTXVB60JoVpZXLRolKleF"}]},"maintainers":[{"name":"axelhzf","email":"axelhzf@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/puppeteer-screencast_1.3.0-post_1524215889007_0.11247449773011775"},"_hasShrinkwrap":false}},"time":{"created":"2018-04-10T09:59:25.136Z","0.10.1-alpha":"2018-04-10T09:59:25.321Z","modified":"2022-04-04T17:08:57.760Z","1.3.0-post":"2018-04-20T09:18:09.455Z"},"maintainers":[{"name":"axelhzf","email":"axelhzf@gmail.com"}],"description":"A high-level API to control headless Chrome over the DevTools Protocol","homepage":"https://github.com/GoogleChrome/puppeteer#readme","repository":{"type":"git","url":"git+https://github.com/GoogleChrome/puppeteer.git"},"author":{"name":"The Chromium Authors"},"bugs":{"url":"https://github.com/GoogleChrome/puppeteer/issues"},"license":"Apache-2.0","readme":"# Puppeteer\n\n<!-- [START badges] -->\n[![Linux Build Status](https://img.shields.io/travis/GoogleChrome/puppeteer/master.svg)](https://travis-ci.org/GoogleChrome/puppeteer) [![Windows Build Status](https://img.shields.io/appveyor/ci/aslushnikov/puppeteer/master.svg?logo=appveyor)](https://ci.appveyor.com/project/aslushnikov/puppeteer/branch/master) [![Build Status](https://api.cirrus-ci.com/github/GoogleChrome/puppeteer.svg)](https://cirrus-ci.com/github/GoogleChrome/puppeteer) [![NPM puppeteer package](https://img.shields.io/npm/v/puppeteer.svg)](https://npmjs.org/package/puppeteer)\n<!-- [END badges] -->\n\n<img src=\"https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png\" height=\"200\" align=\"right\">\n\n###### [API](docs/api.md) | [FAQ](#faq) | [Contributing](https://github.com/GoogleChrome/puppeteer/blob/master/CONTRIBUTING.md)\n\n> Puppeteer is a Node library which provides a high-level API to control [headless](https://developers.google.com/web/updates/2017/04/headless-chrome) Chrome or Chromium over the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). It can also be configured to use full (non-headless) Chrome or Chromium.\n\n<!-- [START usecases] -->\n###### What can I do?\n\nMost things that you can do manually in the browser can be done using Puppeteer! Here are a few examples to get you started:\n\n* Generate screenshots and PDFs of pages.\n* Crawl a SPA and generate pre-rendered content (i.e. \"SSR\").\n* Automate form submission, UI testing, keyboard input, etc.\n* Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features.\n* Capture a [timeline trace](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference) of your site to help diagnose performance issues.\n<!-- [END usecases] -->\n\nGive it a spin: https://try-puppeteer.appspot.com/\n\n<!-- [START getstarted] -->\n## Getting Started\n\n### Installation\n\nTo use Puppeteer in your project, run:\n\n```bash\nnpm i puppeteer\n# or \"yarn add puppeteer\"\n```\n\nNote: When you install Puppeteer, it downloads a recent version of Chromium (~170Mb Mac, ~282Mb Linux, ~280Mb Win) that is guaranteed to work with the API. To skip the download, see [Environment variables](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#environment-variables).\n\n### Usage\n\nCaution: Puppeteer requires at least Node v6.4.0, but the examples below use async/await which is only supported in Node v7.6.0 or greater.\n\nPuppeteer will be familiar to people using other browser testing frameworks. You create an instance\nof `Browser`, open pages, and then manipulate them with [Puppeteer's API](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#).\n\n**Example** - navigating to https://example.com and saving a screenshot as *example.png*:\n\nSave file as **example.js**\n\n```js\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.goto('https://example.com');\n  await page.screenshot({path: 'example.png'});\n\n  await browser.close();\n})();\n```\n\nExecute script on the command line\n\n```bash\nnode example.js\n```\n\nPuppeteer sets an initial page size to 800px x 600px, which defines the screenshot size. The page size can be customized  with [`Page.setViewport()`](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagesetviewportviewport).\n\n**Example** - create a PDF.\n\nSave file as **hn.js**\n\n```js\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.goto('https://news.ycombinator.com', {waitUntil: 'networkidle2'});\n  await page.pdf({path: 'hn.pdf', format: 'A4'});\n\n  await browser.close();\n})();\n```\n\nExecute script on the command line\n\n```bash\nnode hn.js\n```\n\nSee [`Page.pdf()`](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions) for more information about creating pdfs.\n\n**Example** - evaluate script in the context of the page\n\nSave file as **get-dimensions.js**\n\n```js\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.goto('https://example.com');\n\n  // Get the \"viewport\" of the page, as reported by the page.\n  const dimensions = await page.evaluate(() => {\n    return {\n      width: document.documentElement.clientWidth,\n      height: document.documentElement.clientHeight,\n      deviceScaleFactor: window.devicePixelRatio\n    };\n  });\n\n  console.log('Dimensions:', dimensions);\n\n  await browser.close();\n})();\n```\n\nExecute script on the command line\n\n```bash\nnode get-dimensions.js\n```\n\nSee [`Page.evaluate()`](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageevaluatepagefunction-args) for more information on `evaluate` and related methods like `evaluateOnNewDocument` and `exposeFunction`.\n\n<!-- [END getstarted] -->\n\n<!-- [START runtimesettings] -->\n## Default runtime settings\n\n**1. Uses Headless mode**\n\nPuppeteer launches Chromium in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). To launch a full version of Chromium, set the ['headless' option](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions) when launching a browser:\n\n```js\nconst browser = await puppeteer.launch({headless: false}); // default is true\n```\n\n**2. Runs a bundled version of Chromium**\n\nBy default, Puppeteer downloads and uses a specific version of Chromium so its API\nis guaranteed to work out of the box. To use Puppeteer with a different version of Chrome or Chromium,\npass in the executable's path when creating a `Browser` instance:\n\n```js\nconst browser = await puppeteer.launch({executablePath: '/path/to/Chrome'});\n```\n\nSee [`Puppeteer.launch()`](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions) for more information.\n\nSee [`this article`](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for a description of the differences between Chromium and Chrome. [`This article`](https://chromium.googlesource.com/chromium/src/+/lkcr/docs/chromium_browser_vs_google_chrome.md) describes some differences for Linux users.\n\n**3. Creates a fresh user profile**\n\nPuppeteer creates its own Chromium user profile which it **cleans up on every run**.\n\n<!-- [END runtimesettings] -->\n\n## API Documentation\n\nExplore the [API documentation](docs/api.md) and [examples](https://github.com/GoogleChrome/puppeteer/tree/master/examples/) to learn more.\n\n<!-- [START debugging] -->\n\n## Debugging tips\n\n1. Turn off headless mode - sometimes it's useful to see what the browser is\n   displaying. Instead of launching in headless mode, launch a full version of\n   the browser using  `headless: false`:\n\n        const browser = await puppeteer.launch({headless: false});\n\n2. Slow it down - the `slowMo` option slows down Puppeteer operations by the\n   specified amount of milliseconds. It's another way to help see what's going on.\n\n        const browser = await puppeteer.launch({\n          headless: false,\n          slowMo: 250 // slow down by 250ms\n        });\n\n3. Capture console output - You can listen for the `console` event.\n   This is also handy when debugging code in `page.evaluate()`:\n\n        page.on('console', msg => console.log('PAGE LOG:', msg.text()));\n\n        await page.evaluate(() => console.log(`url is ${location.href}`));\n\n        await page.evaluate(() => console.log(`url is ${location.href}`));\n\n4. Enable verbose logging - All public API calls and internal protocol traffic\n   will be logged via the [`debug`](https://github.com/visionmedia/debug) module under the `puppeteer` namespace.\n\n        # Basic verbose logging\n        env DEBUG=\"puppeteer:*\" node script.js\n\n        # Debug output can be enabled/disabled by namespace\n        env DEBUG=\"puppeteer:*,-puppeteer:protocol\" node script.js # everything BUT protocol messages\n        env DEBUG=\"puppeteer:session\" node script.js # protocol session messages (protocol messages to targets)\n        env DEBUG=\"puppeteer:mouse,puppeteer:keyboard\" node script.js # only Mouse and Keyboard API calls\n\n        # Protocol traffic can be rather noisy. This example filters out all Network domain messages\n        env DEBUG=\"puppeteer:*\" env DEBUG_COLORS=true node script.js 2>&1 | grep -v '\"Network'\n\n<!-- [END debugging] -->\n\n## Contributing to Puppeteer\n\nCheck out [contributing guide](https://github.com/GoogleChrome/puppeteer/blob/master/CONTRIBUTING.md) to get an overview of Puppeteer development.\n\n<!-- [START faq] -->\n\n# FAQ\n\n#### Q: Which Chromium version does Puppeteer use?\n\nLook for `chromium_revision` in [package.json](https://github.com/GoogleChrome/puppeteer/blob/master/package.json).\n\nPuppeteer bundles Chromium to ensure that the latest features it uses are guaranteed to be available. As the DevTools protocol and browser improve over time, Puppeteer will be updated to depend on newer versions of Chromium.\n\n#### Q: What is the difference between Puppeteer, Selenium / WebDriver, and PhantomJS?\n\nSelenium / WebDriver is a well-established cross-browser API that is useful for testing cross-browser support.\n\nPuppeteer works only with Chromium or Chrome. However, many teams only run unit tests with a single browser (e.g. PhantomJS). In non-testing use cases, Puppeteer provides a powerful but simple API because it's only targeting one browser that enables you to rapidly develop automation scripts.\n\nPuppeteer bundles the latest versions of Chromium.\n\n#### Q: Who maintains Puppeteer?\n\nThe Chrome DevTools team maintains the library, but we'd love your help and expertise on the project!\nSee [Contributing](https://github.com/GoogleChrome/puppeteer/blob/master/CONTRIBUTING.md).\n\n#### Q: Why is the Chrome team building Puppeteer?\n\nThe goals of the project are simple:\n\n- Provide a slim, canonical library that highlights the capabilities of the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/).\n- Provide a reference implementation for similar testing libraries. Eventually, these other frameworks could adopt Puppeteer as their foundational layer.\n- Grow the adoption of headless/automated browser testing.\n- Help dogfood new DevTools Protocol features...and catch bugs!\n- Learn more about the pain points of automated browser testing and help fill those gaps.\n\n#### Q: How does Puppeteer compare with other headless Chrome projects?\n\nThe past few months have brought [several new libraries for automating headless Chrome](https://medium.com/@kensoh/chromeless-chrominator-chromy-navalia-lambdium-ghostjs-autogcd-ef34bcd26907). As the team authoring the underlying DevTools Protocol, we're excited to witness and support this flourishing ecosystem.\n\nWe've reached out to a number of these projects to see if there are opportunities for collaboration, and we're happy to do what we can to help.\n\n#### Q: What features does Puppeteer not support?\n\nYou may find that Puppeteer does not behave as expected when controlling pages that incorporate audio and video. (For example, [video playback/screenshots is likely to fail](https://github.com/GoogleChrome/puppeteer/issues/291).) There are two reasons for this:\n\n* Puppeteer is bundled with Chromium--not Chrome--and so by default, it inherits all of [Chromium's media-related limitations](https://www.chromium.org/audio-video). This means that Puppeteer does not support licensed formats such as AAC or H.264. (However, it is possible to force Puppeteer to use a separately-installed version Chrome instead of Chromium via the [`executablePath` option to `puppeteer.launch`](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions). You should only use this configuration if you need an official release of Chrome that supports these media formats.)\n* Since Puppeteer (in all configurations) controls a desktop version of Chromium/Chrome, features that are only supported by the mobile version of Chrome are not supported. This means that Puppeteer [does not support HTTP Live Streaming (HLS)](https://caniuse.com/#feat=http-live-streaming).\n\n#### Q: I am having trouble installing / running Puppeteer in my test environment?\nWe have a [troubleshooting](https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md) guide for various operating systems that lists the required dependencies.\n\n#### Q: How do I try/test a prerelease version of Puppeteer?\n\nYou can check out this repo or install the latest prerelease from npm:\n\n```bash\nnpm i --save puppeteer@next\n```\n\nPlease note that prerelease may be unstable and contain bugs.\n\n#### Q: I have more questions! Where do I ask?\n\nThere are many ways to get help on Puppeteer:\n- [bugtracker](https://github.com/GoogleChrome/puppeteer/issues)\n- [stackoverflow](https://stackoverflow.com/questions/tagged/puppeteer)\n- [slack channel](https://join.slack.com/t/puppeteer/shared_invite/enQtMzAyOTU1MzQyOTQ1LTUzOTAxNjE5YWI0YzNmYmRkN2I4MDg2MzI4OGE3YWNhZDBlYWMyNTlmOTJlN2RhYzlmODI4ZDQxZGEyMGIwNDY)\n\nMake sure to search these channels before posting your question.\n\n\n<!-- [END faq] -->\n","readmeFilename":"README.md"}