{"_id":"@affinio/wdio-screenshot","_rev":"1-40ccd7299f3d585701f2789d883a1267","name":"@affinio/wdio-screenshot","dist-tags":{"latest":"0.6.0"},"versions":{"0.6.0":{"name":"@affinio/wdio-screenshot","version":"0.6.0","description":"Screenshot commands for WebdriverIO","main":"lib/index.js","files":["*.md","src","lib"],"scripts":{"clean-lib":"rimraf lib","clean-tmp":"rimraf .tmp","clean":"npm run clean-lib && npm run clean-tmp","build":"npm run clean && babel ./src -d lib","test":"npm run clean && mocha --compilers js:babel-register --timeout 15000 --recursive test/unit","test:local":"npm run clean && wdio ./test/wdio/wdio.local-conf.js","test:sauce":"npm run clean && wdio ./test/wdio/wdio.sauce-conf.js","test:appveyor":"npm run clean && wdio ./test/wdio/wdio.appveyor-conf.js","test:standalone":"npm run clean && npm run selenium-install && mocha --compilers js:babel-register --timeout 30000 --recursive test/standalone","selenium-install":"selenium-standalone install","server":"http-server test/fixture/web -p 3000","deploy-integration-tests":"gh-pages -d test/fixture/web","prepublish":"npm run build","release":"np"},"repository":{"type":"git","url":"git+https://github.com/affinio/wdio-screenshot.git"},"bugs":{"url":"https://github.com/affinio/wdio-screenshot/issues"},"author":{"name":"Jan-André Zinser"},"license":"MIT","peerDependencies":{"webdriverio":"^4.0.7"},"dependencies":{"babel-runtime":"^6.9.0","debug":"^2.2.0","fs-extra":"^3.0.1","gm":"^1.22.0","image-size":"^0.5.0","jimp":"^0.2.24","lodash":"^4.16.1","uuid":"^3.0.0","which":"^1.2.10"},"devDependencies":{"babel-cli":"^6.9.0","babel-plugin-lodash":"^3.2.9","babel-plugin-syntax-async-functions":"^6.8.0","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-plugin-transform-regenerator":"^6.9.0","babel-plugin-transform-runtime":"^6.9.0","babel-preset-es2015":"^6.9.0","babel-register":"^6.9.0","chai":"^3.5.0","gh-pages":"^0.11.0","glob":"^7.1.0","http-server":"^0.9.0","mocha":"^2.4.5","node-resemble-js":"0.0.5","np":"^2.9.0","rimraf":"^2.5.2","selenium-standalone":"^6.4.1","sinon":"^1.17.6","wdio-mocha-framework":"^0.3.2","wdio-sauce-service":"^0.4.0","wdio-selenium-standalone-service":"0.0.8","webdriverio":"~4.8.0"},"engines":{"node":">=4"},"gitHead":"40224e7ee42eaafadfed946890dfccbc6044943f","homepage":"https://github.com/affinio/wdio-screenshot#readme","_id":"@affinio/wdio-screenshot@0.6.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"affinio-joel","email":"joel@affinio.com"},"dist":{"integrity":"sha512-hCuqVbvfqtFX+QV2sT7djbhkc0ITOU6YuUCTi7OmU52JRJWXOKReZFR9PxzUe4+frIiUG2OJKpQ7mulCvyupKQ==","shasum":"119b29f6014b1728efaaf7cb593818636b826442","tarball":"https://registry.npmjs.org/@affinio/wdio-screenshot/-/wdio-screenshot-0.6.0.tgz","fileCount":72,"unpackedSize":135450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKVMtCRA9TVsSAnZWagAAT1wP/2w+H7zadzWRA3232hd1\neyG47obQdZUOeEH0zdhi0UJOcX6cKYEQyl9Vb+xN1g+LHvgp96kaSedneK2K\nz2IM6n6ROLLURK+C9FkQQ0Tykh3LFYMRFnrXhYdR6p0itTF1JW7R4r0kU0hm\nwvG/FrG306Osc1lt97vDRMi3O1apqyk+ZPpN5Hqy90x1PBq+bVSCjug7lRsx\nR9byyRBFJO6LfBN3Cv8gCOgwIrSqGV61NBLUw6/BZlJ2XTWiDTGu2mKX6rpl\nnD0VhwOUoyNA3JZ7wfaoCFc6ZLWAbvkCKAUoesPLi/u0w0YwYpTrArLu8+37\nbaw0yphULdXIgWIOCgzaUEI76ERPDA4SdfoX2Qnp+dIOeM2XrBQ5tA79TZ2P\nEB32bc64PeDMyAGiuvIVAnrR5oGfwyOJMjwuwhjUopIyAALI/QlnWQTi2eOl\nosHyOmnYXU8htB8RihBz4XjUWnDAIqHFzrer3zgPBy1NuSji4zDQ2mwmcMAH\ntVzfLCrbhNDCQjixKxJ/YasqP5Wa1X5Tg31LKjfD8+uI6upprDtwM7SSYmvQ\nrELHCBSE1vAQr1IOthj1tGfur+34xecWyBOcBlI/yijxMXCKIdlJ+8JGHoJ/\ngKZXLJfOeOcgpcmAdvzqZCiB5Hc9IRe6uiFuByrWOF9oErXb5cf9omJCeEi5\nsXzs\r\n=vNnv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDC3JTOpEqUqevU03wH1oYCTQv/vN2OWgQvz7huYbx1OQIhANk1v+G5S8QVWCdWLRZysB2xqb1IN1m8uVgu2X/8ZD33"}]},"maintainers":[{"name":"affinio-joel","email":"joel@affinio.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wdio-screenshot_0.6.0_1529434923646_0.5896271183183917"},"_hasShrinkwrap":false}},"time":{"created":"2018-06-19T19:02:03.419Z","0.6.0":"2018-06-19T19:02:03.703Z","modified":"2022-04-04T11:50:41.946Z"},"maintainers":[{"name":"affinio-joel","email":"joel@affinio.com"}],"description":"Screenshot commands for WebdriverIO","homepage":"https://github.com/affinio/wdio-screenshot#readme","repository":{"type":"git","url":"git+https://github.com/affinio/wdio-screenshot.git"},"author":{"name":"Jan-André Zinser"},"bugs":{"url":"https://github.com/affinio/wdio-screenshot/issues"},"license":"MIT","readme":"# wdio-screenshot\n> A WebdriverIO plugin. Additional commands for taking screenshots with WebdriverIO.\n\n[![Build Status][build-badge]][build] [![Build Status Windows][build-windows-badge]][build-windows] [![npm package][npm-badge]][npm]\n\n\n## Browser Support\n[![Build Status](https://saucelabs.com/open_sauce/build_matrix/zinserjan.svg)](https://saucelabs.com/u/zinserjan)\n- Firefox\n- Chrome\n- Internet Explorer\n- Safari\n- iOS<sup>[1](#footnote1)</sup> <sup>[2](#footnote2)</sup>\n\n## Installation\n\n\nInstall wdio-screenshot via NPM as usual:\n\n```sh\n$ npm install wdio-screenshot --save-dev\n```\n\n\nInstructions on how to install `WebdriverIO` can be found [here.](http://webdriver.io/guide/getstarted/install.html)\n\nNote: If you want to improve performance, you can [install GraphicsMagick](#use-graphicsmagick).\n\n## Configuration\nSetup wdio-screenshot by adding a `wdio-screenshot` key to the plugins section of your WebdriverIO config.\n\n```js\n// wdio.conf.js\nexports.config = {\n  // ...\n  plugins: {\n    'wdio-screenshot': {}\n  },\n  // ...\n};\n```\n\n\n## Usage\nwdio-screenshot enhances an WebdriverIO instance with the following commands:\n\n* `browser.saveViewportScreenshot([fileName], [{options}]);`\n* `browser.saveDocumentScreenshot([fileName], [{options}]);`\n* `browser.saveElementScreenshot([fileName], elementSelector, [{options}]);`\n\n\nAll of these provide options that will help you to exclude unrelevant parts (e.g. content). The following options are\navailable:\n\n\n* **exclude** `String[]|Object[]` (**not yet implemented**)<br>\n  exclude frequently changing parts of your screenshot, you can either pass all kinds of different [WebdriverIO selector strategies](http://webdriver.io/guide/usage/selectors.html)\n  that queries one or multiple elements or you can define x and y values which stretch a rectangle or polygon\n\n* **hide** `String[]`<br>\n  hides all elements queried by all kinds of different [WebdriverIO selector strategies](http://webdriver.io/guide/usage/selectors.html) (via `opacity: 0`)\n\n* **remove** `String[]`<br>\n  removes all elements queried by all kinds of different [WebdriverIO selector strategies](http://webdriver.io/guide/usage/selectors.html) (via `display: none`)\n\n## Use GraphicsMagick\nwdio-screenshot uses [GraphicsMagick](http://www.graphicsmagick.org/) for image processing when available. Without GraphicsMagick installed, wdio-screenshot fallbacks to [Jimp](https://github.com/oliver-moran/jimp) - a image processing library written in JS.\n\nIf you want to install GraphicsMagick, follow the instructions below.\n\n#### Mac OS X using [Homebrew](http://mxcl.github.io/homebrew/)\n```sh\n$ brew install graphicsmagick\n```\n\n#### Ubuntu using apt-get\n```sh\n$ sudo apt-get install graphicsmagick\n```\n\n#### Windows\n\nDownload and install executables for [GraphicsMagick](http://www.graphicsmagick.org/download.html).\nPlease make sure you install the right binaries desired for your system (32bit vs 64bit).\n\n\n### License\n\nMIT\n\n---\n\n<sup><a name=\"footnote1\">1</a></sup> Scaling of iOS Simulator has to be 100% for properly recorded screenshots (see [here](https://discuss.appium.io/t/ios-screenshot-not-complete-with-appium-1-4-13/7126))\n\n<sup><a name=\"footnote2\">2</a></sup> iOS scales the zoom level to fit the website into the viewport when the width of your page is bigger than the viewport. Capturing screenshots of such scaled websites with iOS is experimental and error-prone. If you notice any errors, adjust your viewport settings in your meta tag to disable scaling with `<meta name=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\">`\n\n\n[build-badge]: https://travis-ci.org/zinserjan/wdio-screenshot.svg?branch=master\n[build]: https://travis-ci.org/zinserjan/wdio-screenshot\n[build-windows-badge]: https://ci.appveyor.com/api/projects/status/ef8r3rjiydld171i/branch/master?svg=true\n[build-windows]: https://ci.appveyor.com/project/zinserjan/wdio-screenshot\n[npm-badge]: https://img.shields.io/npm/v/wdio-screenshot.svg?style=flat-square\n[npm]: https://www.npmjs.org/package/wdio-screenshot\n","readmeFilename":"README.md"}