{"_id":"@axe-core/pupeeteer","_rev":"28-58da6046e39cd98cae2b915eb4c609b3","name":"@axe-core/pupeeteer","dist-tags":{"latest":"4.0.0-alpha.13","next":"4.0.0-alpha.38"},"versions":{"4.0.0-alpha.13":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.13","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.13","maintainers":[{"name":"npmdeque","email":"axe@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"},{"name":"dqlabs","email":"labs@deque.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"2866e42553b0cd487f32bcefba3f5c097191cca1","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.13.tgz","fileCount":39,"integrity":"sha512-F1IDefWSzipUrnfFQvYKJiXszmiL8kimPMoMP4gvl28MtUHrUPjRx74c+WsFB93r2rNF+YhuMk84pHYJswOziQ==","signatures":[{"sig":"MEUCIQDnH/e5I1buo4je9Nxzr85f56FaZpVpg4AjhZEbEXz8RQIgSzoXV5nF/TtNmPNU0gacAX5xMzX19knVr88kBQsaolw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1P2DCRA9TVsSAnZWagAAgwAP/2luYKfd0lHaCIdwgWu0\nudSW24YH1kYQ40ZjTE9VXMYxnygMoG3PrrNUiCCFk/4xGisGRGdk3fFgfmAW\nvz9lYdZYAJ0j6GRQUj75Fqyn0sntsT6RBILXZ7uG6iCOS9g7FJUoc/eSnRiT\nnBIi1FoEBMl1H5NnVmyYvZH8Bryc0Bo9v+5PKA1q1H06zHyNZaWw/v1fgSAi\nYcLdGeT+odpfhaghfB8CU5Y66gGVSVvmrvl/OefUlfTIWXjsrxcTjh2/P6+D\n0fQGlKXfhgTaB05SjkonnaCRv/szehnWP10BaPXHgQYAMxoyzW92J5VatfxO\nts/1yWRbBGNT0kmd92Z/AArGrAD8x3MzUACD9qM+YiKAEcB39E9dklMJTLRb\n7tOn+dZAgsOWGWe/8Y2Kdcrrtoe9vcmxXrBSDo2QZXnb7d5of23k5cM4MaNw\nKVQoDKq1d4K7yMHV2AKsuSMhavW4pdufLBnWOAiKev3ZxKJ8+SEFMKIWdaof\nem+7Ysni8b83uN0rQM9uyTtje4XElsI9+WGP5knKrBltcuHDVFYoI0SlWUhg\nNsihZ/P1CdeDvY0P+p4y5WR87yzFac6cxIXdb7c6owyUgg+IonjeX4Y2bevh\nWgqeKnrcK10Bx9Pb9xRdYHkrBreVHwV+6vq/vHoFYKPf1BfvYu4wt4XNWU2Y\nI4h0\r\n=xdKs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","engines":{"node":">=6.4.0"},"gitHead":"0c9610880742ce853b9e64891ce4e817899d27a4","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.17.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.17.0","dependencies":{"axe-core":"^3.5.3"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.13_1591016834795_0.26284136603275066","host":"s3://npm-registry-packages"}},"4.0.0-alpha.14":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.14","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.14","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"466337809b019ea9acf810c862f298e9d5c24f39","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.14.tgz","fileCount":39,"integrity":"sha512-OyGh/w++xIYHhPvyDuIQ8nI2uOkfv9+17NcZmdZeGPDOwJ3zhmBD9VWvmigHmdgKpfU5yd7luslRS6uuxL2G5w==","signatures":[{"sig":"MEUCIQDfF5GkttlOsxbHuJVxv/T3NT61YuxivdYC6xde1EeCrQIgYJ31U2jvFVX1aV7p0y+OkOQsif4Lg2OYcPfutjkLYf4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1nI4CRA9TVsSAnZWagAAwxAP/36h5D9q7xm6SFS4xW8f\nQlG5kbS58+TBITk5RPbjx2urnVdA9pC7iLrX2I/Eueanjz5403eUWsAAaBch\n0ZUNX0ezFsoCtd3wCJi1OleQ1DuCPiMQRG7ZBbfv62lwMdNSnYkoN4a4UCAn\nKhDy02VU6+9KNoOUQiAAJh0VwzZfY6hvd8gcDYH2ymz74W4uSHRSQefuZ/1j\n+YbpfMj2lj3d5zzoppZRncDDNgvAoOwSRBoE24v1e5/EfH4JRpeRlyKcYezc\nm3iCBpsSdCoZ+wz6uTfeKi+S/NkVlKByBh1sWCkz94/5frgy9l8AmeHQykXJ\njkWWbjlVicUk/+GYpn/YS1d6gravfEWYHlyhKgf836cpFwLE/DsLGrFoxFEU\nETpI/CTLoPSO8dXDFKlQMQo5TOOKMTir/EpzTXqk9lQu3mQhxIEsIEfl+1OW\nF9nonjqNfuuq+b5xuy1e4CJ91VVnEgxc63OPGzJZGUtagYoVwRG9Fx2rGkuC\nR6kr/vQc62dYI2wfoPB6CEbF9wtLUimWPFVvVaTTa+yzSev2oTkwDzjzQ+KT\nHvBSTSOx086ZDWlJvcSTkH+dDFC3zSKPy+Yt0B8mlGHLo23jBc9mx8um9+3Y\nvIcb1H4TfGegehBQRPHXgQwex/d0Liq11KmoW8wy7ZiQvK95IUSXBZDklCmf\nPwdi\r\n=/Foa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"8bdbde894c15950763feabf716746c786b9c5cbe","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.17.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.17.0","dependencies":{"axe-core":"^3.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.14_1591112247635_0.9022705788960945","host":"s3://npm-registry-packages"}},"4.0.0-alpha.15":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.15","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.15","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"811a937fee092f0d80c33602237065197ade1094","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.15.tgz","fileCount":39,"integrity":"sha512-74gR++XebrxX+IbwtY6FRl3SoyqgnB53bLOikPwDoDrofsbLp2hwQ2AJ7uat9fyQKm4lhZma6UZVzjsn9O+ZQw==","signatures":[{"sig":"MEUCIAJwQ0HOvKmO8qszEGqRMKvjFQFwETuOXQGaS9qCwK4gAiEA/NxMynWe+2NON1zJqXKPytLoOuQUiV3pP19C5SaCoM8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1odmCRA9TVsSAnZWagAAGSoP/2HilDCjc+Nb/+dpQf1b\nYztXkCd0H5Dcej2uMwqXX7hKInvxk6YpdlzTp55yLrN8inCaUFKZNGhweMmV\nojfKsNEs8PMsrBk7H47d3V2kqBKHU9DySugQjpu5sm2ra5ITLh3vxAzC19I6\n0+u6kj4uEmKbLzmdcvitjaDE7ImWb1NjS7FW+FEMKeUJvO9qumU2Btfc4Cnc\n9cOlJ4qN3YSEwxrfyjqWrHcEPRBwheAHZCQw9T3vkRvER8Xb1+cgsm/FKVcn\nWKHdN555qszCxH9OHf7qcF4dzxO1DlS8ZqN7iY7CHhHhwfTODhLHFjdxLasq\njsE/5m3uVmafAfIodAJPebSF4Lw9+9q4VJqYNZCpqzG5uiHkITcHwRYuU+sN\n6irXA34ZeY9bJVEFK7RHnB6X/ObUo6ENOUiGoDhKLHnWbECz5MU1P+8+U1ZL\nLlg9eDdu0MfcW99Eh9l1S7T8JbkrnGoTlCwMV042DSkK/GteR5qvzLXh7RTL\nF9fUqm89ivVcMIFj2lpiyJj9P/wUptG1c/E/DiyyTRzUWLiYyxT+sToW7cjq\nbSOShMNrRz8VxXyKFm8U6JdA1/EnA7p5N4WqCd3OV5zGh3K+cFLIHDp+Fxxk\nVtXqepf/HH5cvYx04x8JwW6TogEE0ZpJTACZEaWuHc+4OOZ1i8B0SWHLmOrH\nIbyX\r\n=xXFB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"e29ea09ee8b8a33d0040afd07f1efd07df60f253","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.17.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.17.0","dependencies":{"axe-core":"^3.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.15_1591117669894_0.4014712166654375","host":"s3://npm-registry-packages"}},"4.0.0-alpha.16":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.16","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.16","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"0efe84f1b9612bd928861a53024e67821dab7235","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.16.tgz","fileCount":39,"integrity":"sha512-zmvIHwKIgra+mGmnd5jQahuZ3zboc0LLtL+8kHU3uutjCYyN1KMQBsl4RE9i4VPCem8bWiCpZXId3uSnsy0LKQ==","signatures":[{"sig":"MEUCIQCPgBie1+hixxjltAM3IeexGPdQF9xORHcu/LpCSl+Z2gIgcf+6TRNjQ6B8PhcpQgZUOe/3wkbEFNmIliTvLtKtBZo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1pDuCRA9TVsSAnZWagAA9OcP+QHTgJ5kOn1FgoWfsz2O\nwyyPVQxarb8i9k20VfCAxsCyWb37nZulEuycX0W7RVyXgANHpleOWTkQsAsd\nPnOL8JZsjE5bZ5WqioEuB6cTmDBh3D6DlTiin2dQIBm8mNSRDQIbcxolJBg+\n5yYmck2Z7OUCy1C4A4mzKctpPKLWlrGal4/EpIBAWoOYkIjpuViY3LLLpQ/1\nJoRKW8z5LjPNcu93cA4MUK+CmLgpkaYQHqux8ZtPALe9I0oo9emHO3hOlse2\nBuFLTrpuDOVZvW+9DIx/peTTTeeNbAONerWNukMgGT+Ee+PUrF/S8Y31p8H1\nzBnL10NibUp5JFYoA+ISqX4UMztCbR5MwYAmWV3nDEblJZxWnTzTqEHHZNnJ\njbaHUua7YBCiUNv2dMvutg1XIWQosU0kd67QhS7kOyzFhU03xoCyIR0e1G44\nwo2kGHWOrp+m/5kmICtsSeLUTxCBZqRa7/8NLnqc+dANhnXWrTNPeEGMuTQq\nq4Gl8Ld8WEwVVo+ayCLKQB4wYiHu3YdSfR9lzRAm2uz9OYEEI1RBFIHJ5eGY\nTu+uBle9sdmAEtpgsXTOX0vr42iDPnTeU5M1fVvVmHbm8V27OI7pBmg6KCUo\nfIJQnIcojuryHuc3Z2pgjVQa6l5877QIA4ju5CJjquAshGKVkErw+DSdH8rE\nh1jk\r\n=IMia\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"56395f047985f8f81951531de84b79ff8bb33881","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.17.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.17.0","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.16_1591120110071_0.6053105609138527","host":"s3://npm-registry-packages"}},"4.0.0-alpha.17":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.17","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.17","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"e65159c5d1dfa1da89b1386ab99b5cd335119c93","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.17.tgz","fileCount":39,"integrity":"sha512-UDHeGjXFKXncMnqqZczRFUFovyM0YEJnJC4z/gLzqjh9GF3Q8Se8z3Bk7GzuCokdtczXTzd2qIKoZu6qb1BK3w==","signatures":[{"sig":"MEUCIDWxgycKQPjfLatfd0ulBAg4rqIKJWN/pebhgwQLXmnYAiEAicGcKi/1Ympt3m/pI8Jfk0iRQMIdQshH0/9A7/ZJ6WU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1pQACRA9TVsSAnZWagAAlsAP/2NIivrrAhKt57FRep/J\nfa4xJrQQR7kJ+Gl3iwlrjPF2dWId8GeySiVGEMeU5/IxbEAbBH3ruXDYqNpQ\n2NUTfEmYp/F4jOKE5ByZlAB7ZMVADpB+LY3hbO+gcZfhBy8zWtRm4gxCNsX+\nQkfHuNNVNxvDpuXhKu1dunTP60/9sRRXUw99v890zjmllVTmPHWuagPPf/C8\nbh9RNXndXmO43BuNcsx4XxXh+Pd+p+mxbHlCnL6vSyr801ZCDn0CJWBdQf51\nYYF2NxKMI1NEMrJy4d2pZS5vtho3EUPrUn4ENYtoa+8Fu1fUN85AoMTBG3+/\n0duAMaL4gDBexKby2ENbZI/lei+dnMGpypeWj3nlb3tVnDQ3ua8TynPLGnee\nmoTdTcJd1oCX9HrNC71P5lKdg256pdH8U1KI+ljeM9OFjDrAIoBshgvaN78e\nK2GnQtbZfTlU6TE/8MUaYKNU6sqobysJR5Aq8Sx0D1YXY7etMUGc8aEGQV7l\nAy+A6mwxvydrZHzJMhmsXCO1sD9L3Bx4UuyJsmk1sYIO1ssKZDqUuI9HEtSV\nvMsr8kAJnPdIyIzl33KrDZL1zAL8CsDP5wy14bsIb+OUiNpRptc1DZ8XHyu8\ndJbEzEsF+it+O6ZBAT91OKnwXottDWp7jp9ywcpcjEEFTXp5Xcvugvsk1DqN\nCNIy\r\n=M+M9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"8245861d6b773ebc0e47e55775fdcde9d8f58979","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.17.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.17.0","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.17_1591120895679_0.3133394325566756","host":"s3://npm-registry-packages"}},"4.0.0-alpha.18":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.18","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.18","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"4970afbdd6c47e1f983e0062c78c28f71fad43f3","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.18.tgz","fileCount":39,"integrity":"sha512-fPApYg71wDdIo55xQCkjasp7EYS0Zc9TJNbbuPlg6gBFOBDR6ta01073ua+9yITk0meMAU7hCyVTRWMBh2zHYQ==","signatures":[{"sig":"MEQCIBSqBPDCYLO/6AyzVA5uWEwrDUPcRYHAx2+zz5Zizr0IAiBWYr0uqfehxsbPeK8ILiM6WQRyaTpTsA1A+ZBt13mrVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe195kCRA9TVsSAnZWagAAvKIQAKJb/b71mej8PWG1kP+m\nGKz3H3rzZLCJsiKjfc+8y0zl5N+j0IkYZpxcAC/cK9QYpkIim93gOaqf3z+9\nDpw6t/6swNJD48deBMBlvJa6Z9Pl5dcvrLBdKwlR9qNfVrdQKrmSVMOn4S4q\n4H9D2/w/l5DR2HexElp7BqHW/TE/rR5leGzJeyMEfgO6jCkZa5tWYW7jPM7j\n2wUttkAn1ep80U9CUC42txaVk7scUh6THPjAqfhwQ7iK04b5eY9FfZhRDjYK\nYBzmmGuglX5jIwOYiEwcv2a+iGrbdrCNp4i5jtqdbX2bqunEL+H7xRQA1agf\nGFfjceJyrMwpDKbWp6PmArSK6rCyzPhnZsYG2aNJBj06FBTQL66AUlA+oU25\nmpfkQ0Ea3KB9+wpUzHoZfRdJRqa3JbRNEhtk8nhRu2NyUF64Ghh4ieHZvUrj\n0Szp7DVg8PZ+IL4SRYT0xOME4TGgystsXIb+iIxgzv66DYxEDSP3Odd0k9X5\nTauYAO3gzDPUkKwkcXvla56Y5TL+jX+YtDNairmA5WuGI8rTuEO97ocTBE9q\nbOywyNsqgB4Pso4IaKGd63t1veec8jYgoPTLJA08kk3hshsEKOhsRPq7wWMd\nVqYpPF6B+SkOuR80m5UyEA67L8C+ehLslFN9YRbWDSfQ2i3dd33f2gP5WxXV\nMkgv\r\n=kIJ9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"651af8faa2d4e44e49bcb311fc4b4e4d03f70d84","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.17.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.17.0","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.18_1591205476287_0.9667832019456748","host":"s3://npm-registry-packages"}},"4.0.0-alpha.19":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.19","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.19","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"111f627d20e823ab77b6064b7e8c0b00824aa35e","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.19.tgz","fileCount":39,"integrity":"sha512-TyJYYaKElyjITi8mZaLN7C1kot1oiYg1Weh1j7IvfTklIXt4HSxflIK0Mn+OxjcHQUA0qQFTda+hR5u6zHgVMg==","signatures":[{"sig":"MEUCIQC6qip2JJu+GtKHGQ0y9wEgTR1539kKwe8rBmu7E8I1zQIgJK+znjRaMfwqEhmPdGddhlLKTgLwAK00aq6iLHlg2uE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2P2UCRA9TVsSAnZWagAAFPEP/02IhYPuwtvE6mFsHZaM\noqVNFbv58rkxp4ajZxCtW7FtXBKOTjcBayFWFMrNwZwv0L41ezNvEtxpCmKK\nFvzoS2R2ti4zOGYswoXhp+Hbi6q07KljPrOtojPYnQieqJM7yjh9WAQoF6W5\n30Yl3oYnEPhj0LrShV6lbWhuUxlv9e3k/HMQvRPKlPXvydBdqp2Bs35NZv62\n6Jal8k9pkhMpa8L5UiHceA6ukhzTRjUMe0KV5nc/sLH/IMZa4jV88tFQHJFe\nfKkfmYBtUs2s3TSF77icltS0dFaQZkiRqEMZ4hCbRaxMwzmyTFIyLwxyLniP\nAun8V1/9nIzF78/6Hj/FbarbEr8pk2dXPnhk4s8cou5AQI7HDKCOjIdmSE90\neHb54s8QkjT0PwxbR+vtFvRyQiGC5XC3aCZrm7qaCztP2HJB+ufVX4LnPWEa\ncr33ZlVnLjch9i0e/gUbflR+rfjXT+z/7Gdc5WjZIe3ATF0vrde7q1e/oLfP\n13/9Uy/DhQfkXWCmv77y7VsmCkllm+aJDQ9Zk2GU06QwYfg88v8tTnp1fksW\nckxqEWUds6zw0Gof64H4Au1U5M7UJD37aKn7PG2j5SwCUgtsdVGCpWr0ffp8\nbiCGAIZ4yPro75TQb2UrRyZFUdmK9366zhG96DfbH1LxISw2KpuPM1+BkoV2\nsTdp\r\n=BYl4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"7218bf683e354257cbee79ba20a2ce0089e5c541","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.0","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.19_1591278995622_0.7574405963207926","host":"s3://npm-registry-packages"}},"4.0.0-alpha.20":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.20","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.20","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"2f30f00d5786abdb49a2b21cbbfba5588edef861","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.20.tgz","fileCount":39,"integrity":"sha512-8ISmBtvDXjAKhvFHUpN+uaP2znFQyZeMCu4hhnjEUuV1/ZWJlVaN1BOWZB5wPsZPMnLWX6Rmdn2ltkuT+Cl2BQ==","signatures":[{"sig":"MEUCICooJoxLdGnfW0E3xa3dXdBgulRnx5A4Smd61JC2eqXZAiEA8oEGWrNhziUjB+PR0Vc2wrvmI1/sXUJ1HQqCrxVBCfw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe36CkCRA9TVsSAnZWagAAI+kP/2xZYlYUx+JrmnRJhRoE\n81RCnj3Ox9TR29zbGRX95qRfkX29+TCkCayVt3XsDAO4pUP5A9lcCwazKtq/\nhnzCuisnYexaOLQNFqqSIqS7FH4BfZSRslnZvTk5hNT2TE15TqLqbxBGVt6a\nrbcmNRywHdhNRy0M0nGveyaaGerbI6nM4Wjg9Fo2BV5sGWIHfrbkxwG2Ldkl\nVg6d0iS84mBEO0oShcEDWgxNKphXFDJyz+U0NSDxQ2V53zGfZhZnfT+UFbGi\n2qZDmsSTBiNgDRXVL3C0WuGfNzFUIDYhnn0RP4eknvcVLAU62WKL8GuJ18jf\nE+9w7CTcET+Ys02g+5EXiNRkx/X4sjB4Pl3h8H6zmKci186mDsgqOHfe79u+\nJVcKR6HBfv7NKHU2y0j200SfcW8wfoGG8RQEUDxWk9gOiEzwdW5sYdUrI2wE\nei91TMH5P6SqNib8cIKd10mgbYba5Fh9csFswSpVDBRbjG4aX9XwBTliOLuY\nbiVcGkSsc4C7rGeDvggLXD3udZHYkeqO02Yge2F/hbyracb/olp5Rn99EcNi\nTRV0Tf3o0BRPxc1PsWklAl49cJmN0oMtNigmmpZhsznhrKReM+UkMsp80Z1L\nmS2lNbgYJuovHfjTC1Em0BkFBRgpba09MReOfGMI1AU8CG79sv8CKoKFiTMe\nA5E+\r\n=24Sk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"4cc51104819636ddb18d4c1fd0cd08b65e50f71a","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.0","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.20_1591713955923_0.8516775285098568","host":"s3://npm-registry-packages"}},"4.0.0-alpha.21":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.21","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.21","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"5037766da33aaf164a022cb90098a4d81086c4cb","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.21.tgz","fileCount":39,"integrity":"sha512-KZQ5h6SKUdR4mnllsb1godFizRaTpIQ4w7I6im6chKVVuExd/YoAeL5tamsubpWs7/kJC0OjSmIkYucWRytXOA==","signatures":[{"sig":"MEQCIA93NN9JyQ1AB+OKRHvn3Z9D3PV9WMwHIkAhG+Ri/K+rAiB3MsWC0a7VXH6iuGI8QKOekVTUK3ap2fka3IvkM5WhZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe36chCRA9TVsSAnZWagAA1ZwP/0NHYmpGOxQ7/6IekPzP\nYer4CevNDpqIDg+d3ghvgDyinVqwCivzd4EZ86Gn7xMXbGbOVsh6j9NTn5PF\n3jXkY96PPSO4XRnLrQt5pAVXoUWXuMNuTKtv46fKSkyNCKdyeH516giEguSy\n4ncRgWEsgYwoeWRYtQ7YtbMptZGwsLBPnl2v7mgIpaDeyX+gBGzYFsvAeCKy\naOHok9QtXYeYx6xSuU6nLTv/0gSumQr9Ytjh3O6hLT8MPaQiU8CobP1ywLRE\njP+bWPZ+OcrI56ONYwFqGi8SlKoVNGYMoRBrWHoPOeLEvdA8WB1oJNqpCrVz\nKUVRr6uO9sw+2edX1c3GlZ/1qkVtqUVnO+e9VI/lvQZgXAlX/xp1LygigCAl\nCpnmHre/AIbLaNPm6RX7aY8swd8lXkxkHfOGDeT2tgxdcckMDZDTO0MTjvrn\nNQ6LHZFMcUpbumvnWx+BtSz2ESIcEEUQglHfzBGcfDxQqq5fT0i44Pd3nfoT\niuLeJqmDKy3igA1k3yoXc8s2bOZ5aDUfUqljtTmlxsP+I42iuOERGl9M+s3K\n8GeeqIzzRdCrQOR0JI1na92QiHKKKLRbjIyiJM+BqODUATNZVlwY3g3NREH9\nGZirY8UGT+nDgc2zMNKZksQix7hbzzb9t38IXRnSCCJnuKJOLmVivefc11q0\n8ZOp\r\n=m1W/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"c0aa15ca0134f300fa5db4887d73c4e9633af2ca","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.0","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.21_1591715616792_0.40637992898263775","host":"s3://npm-registry-packages"}},"4.0.0-alpha.22":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.22","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.22","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"07adf2ddcfcff1992720bb1cc337acd7f60b664a","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.22.tgz","fileCount":39,"integrity":"sha512-y3NfYjWMwJUtYuuSGyeI+pZ34cT9/8Mk+nRXAfz3EaxxCIMwTOXgtbCH/MOq8InFzzP97VIdHo2f8IV13kHAFQ==","signatures":[{"sig":"MEQCIGZ7R2WXvBg6g2ZUbyepKtuDWJCgCU+yS76MyOyTzstaAiAIvvVDkVaZL94lwgEttZKyv6nWVvZynT2ZkoUUyXvTTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe39dtCRA9TVsSAnZWagAAjOgP/A1qqStcC7NKfR/3IcSp\nAkRW8IpkGvDLoS/w9IZcOWJi6GmGoOmH1eDIEDUlYO3Ad2KeUBg2glzceaGw\n21Ltek5C6svsImokSRTh51U03f+6H2umS7c8ina8hyMHK+LV4Brg/09Kas3U\nTSse9LDwXQ9u73vNgFQyW/pcpUlz+0ns96H/+m13lotHkGxvTy9rHcNIaHHW\nUmzOYqQUNO5VvLi2JMT3BeYosUBrOGvTeXC7JmorCyDsWecg9WhmvKa4pDTg\nY9T8oyJhh56f4mLUu5CKDdbOtjuPvmrXDvykJdNe5K3EGlcEK/Ro0SmGBZp8\nL7QxH2a/oVF20Bogwgnheemp3YRRc7HrAcTQnOjfvOrUcDTHtp3UT60JqeiX\ns0QMfqPRNpEw0jsX+h0Qg9Z5drOCK+iypxCi6CP5jAZOLh2YuHWNCcz2J1MG\n7453SnaubpgO/IY0Oh/3nD+WJF1PhHnaydDO3uPtXOt0DKqUmqf3vuwAPPf7\nSkdpoOZol9Oj5gCnXvijjudhmx/LBZ46Lqfo7FY6XvIrs9NT64az95c7xw77\nzS5GwHiqc+y3QIXww2N+0yv/kRBPryuo0z0nH9ga9fGINKJaE5AM8EzUTlqg\nx//u+sInjN4GauWoNDzF/KWy40q055TBIkunNBS8P/TgxSuuS5xeCGdTQR3Y\nOoOT\r\n=lxV0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"7c939d667c02d594ef810fefdc9663b6c856cfbc","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.0","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.22_1591727980679_0.7125093489490968","host":"s3://npm-registry-packages"}},"4.0.0-alpha.23":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.23","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.23","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"0cc431af623166f7c6f10788ab394d4672ffb246","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.23.tgz","fileCount":39,"integrity":"sha512-7qDfnH3vZfjHWjPgAsTKNrSKX/ZWrpbKtCL8OPQgg6aZMfmBEIoQQolUxkx27ZJyYdqNlWnrMRU83tT+d6cBaQ==","signatures":[{"sig":"MEQCIAnNmzh0dxQRWrOejxrk3uwPrKBchw1yLSz81pT8XJI0AiAVpyatVGXwe4NRjZ7mg/I7ai93SyRV0cs5pnBcpXjSHw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3/WhCRA9TVsSAnZWagAAMIQP/jz9tasxRYdyZ0epXs1V\nBs2lVP2XmqhTUec6k8DMWmGKqj/FfCwgZAaxDVNjeFFgtM/E1/rjAVw8oUxj\nF0V7nudGCkdxkNxQEF55NYLkQjil+UbeLSEiUEP3sCMtuThwV0cbh/Q6HuZ0\nq7f3TiHW0qKDqDsrB7st/HLbKmauCPmmV4DrFkaw4Y45LolEXuB+Z7su/Y7O\niOrcBwlRlHTO8ti8Q5Rku65swCUFqXppyHUm7c7je3qbQ2YPY2wYSGN/fBpO\nVnWfpgM57iWjb4KD1VWHk56r/W5FiAoEkp29nOgWVRryIjFGVGdK6xdvHtqn\n7Dndk6gsK9dGUr0z3ur4wmmwUF4bYzJGqV8JXrAQaj5Bz+vEuZniDVDCZuDu\nZ1mX19KeotzbwdPcGnnctjyvGNc1vCLP7HB6eaWQUZLUUu1Jkg48Ci1l3t4B\n+cfX09pFaQIM3JCqbtYfWubZQrtHJnAurwhUGXC7qrniCkn9LV6zBd9Dbz8r\n4khqNlmaHOCYcC8cNgukk//vrV46FskiPxSCCZeQSIlfg5LxlvVaiiHksiy/\ns3JqpG0pSbL8GhVuZnHvYTstE1GJ4rgqoVk+hHqxIwMXH3nMJGKAYm7TRPMY\n3ZVZ1gFOG+N2DbOZ1u9Oa0IRjXFHRQ0rITbmJ80pCkpo/Mc62wwoRI1uPXFI\nF2oZ\r\n=flFv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"5a6f95099ccb4ff62cabb4264e20d86cf5f53e41","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.0","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.23_1591735712540_0.13561265480886697","host":"s3://npm-registry-packages"}},"4.0.0-alpha.24":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.24","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.24","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"f86efb137e7e9057f25b9122876636f34ea2e39c","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.24.tgz","fileCount":39,"integrity":"sha512-O2itYrhuqCAC1WRPBXTEOQZxybNdYsH9BxISCLI20YqayR3eJz/eKQyZ8/ETyt33lWnKOgvt/qDwFIueGHT2uA==","signatures":[{"sig":"MEUCIAndQuKgQUnIAI09nr3OalfXzRKM6j2zuaT9ms4+bdPdAiEAoS33h1A25iERjz2GkStRfm2pNI5E4lbyW1zAVrt0MGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe46WUCRA9TVsSAnZWagAAxE4P/1sm4uJQvwAXxXZA5zZO\n9u8eqgRGDjZ2eW+tpjvxWI3ekD0t8JBp5lo6aiApfV8hpgQ25MAUQTj6ku/S\nmvu33rIhz/tU+m53GBmstLZZkYzS1+P61+x6ficswmxKnszPMciUH1Vhtr7q\n8Tx55ZDearddx/RWs/F0/cohTtKCElJ9aFv6ye5e5oSBrOolMREAWeysIC7D\ngD1FIiI+hBql/WxDR7S8SAolBzU+vXHx0JhEsbyjCZMQCAJ7PMi9rPmS8fMP\n5CtoNXWnUq9sWaqfvHn6VmzRhJ+tZw+Xy1QeRdMejgIkLoGKSQo/Y5BQPgUe\n7LFh2LXZqmFGgSpdyFNfU4IkYexBXtQ9W6NO+mJv7mTsvk7K5xnSx2Etud3r\n3mpwfqgGmEWxTRHLTxjwQv5RkZp8bcvQJ91iw9VKoPwsAUQOsHwWjKjs+Tzy\nPl5Nhzz9o1m0MkgbW1/gpD8cX++JDCJ64c8mXtOnJ2PIqKX881xplxSGvSK0\nUvcI9Esxf6D//ew8kY1mWsr3f+evXeMQ9+mOyRcoyNvz9vA0AbtRQJ7wq9Cf\n7TgbWCaDMcm05ciW3qMu107YYJQjB0EjpKPda6BTbRux4mIYxgmMcF3Ngdn/\nnJNkJu0SBsnKsiUF9lA6sWwS0ItxZ/5BYj0v/Z3GxzVLpCGkCPJ+dZxUVgUc\nC3hA\r\n=rCyF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"f85feb03d1fd199c7aebe0fd347ba8664b52de57","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.0","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.24_1591977363908_0.5962815957064469","host":"s3://npm-registry-packages"}},"4.0.0-alpha.25":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.25","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.25","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"7c3f14deab84018d328d1ef78f3d95a0621030e3","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.25.tgz","fileCount":39,"integrity":"sha512-bspXN8dP9r0sSg4c+wQyoOPEtMrCRKuFMP0f/lMf7SEpAjnkAEneTnOoIUprpfpji5GKQ9CEr6CPG1BFKVS8nw==","signatures":[{"sig":"MEUCIQDj2gUK5HfbbmCnfGdwN55Q0AUnyLyun9C5RM0js8WWSwIgZW1ycktaiXyCAIlVhafFEbktiyG5pC7HTLuP6uAxZB0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6itpCRA9TVsSAnZWagAAN3AP/Rh7LVMw65cMQgKLLI4W\nmiBWGC/Ouz0tb6Rzkr2iMoKr2y3o5k0ettcm+8zdLkuP9LzIjkcL2lfvGSih\nu2MBVTECaha1MSyRm3q8XFWBDs1s3ytj3P6K+pobL+vVtWWMjI9R/rfgKFO5\nTI+I/D4Bl8Y4rA28POsICW5D4Hi0AVSjAsUiB2mis5UIPl3Up69RsQY/lmEB\nJz13n+aNh5M+D7ThIEGzjSPXv+2zzdBKnAYVHwwE+f5aMX7p/TT9EuwV8E7P\nDVk0bXJdczhfgRc89C+HnaQjQko15pryTWvWz19yLk9VLvZbCzwpuDMBafcM\n50/jQ8y/T12JBYAZfoGZ+X+2iPXPrGRrGXsBGVBwFJLCbPFBbDe6ytIvaJwk\nr2Tn6/Fn8WCT3wUmRVAMEwx/5bUUM1dg3k2FnK75n6mdz6re47Ht5+QETh1H\ndyxM5cVZnjFrPMtT6L0z7OvNZXbDnX248jonspMonjkZk1bwnRoTZ1NK3jH0\nDUx5j+RGSplONEWwsmedh4r6UF+fRu9jZCTfcfpS/eQ0Pttx1zYkj4h97WRU\niDDx0Sy7NZsWZm8XuqXXasXZ2cD/qSRPV73NB0WPpejvc3MZpIM8zvKt/RPN\nBB3pPRNVL8uzrcIEmTUQyjL64DSuX8DPNNBpxeU+HE3M435ITmL5xi0tnNGW\nkmPa\r\n=PWeH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"92bf685b2180b625362c9a7438a527efc75fab71","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.0+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.0","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.25_1592404841287_0.5798964983131909","host":"s3://npm-registry-packages"}},"4.0.0-alpha.26":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.26","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.26","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"46a9d2754071ca2d5636d84076bb5d924097134b","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.26.tgz","fileCount":39,"integrity":"sha512-12i33XII6luQqMCy86S+nCIEqL63oWgpbiig3V8krc/RdjjlVqkOu7DN3KOzuCj2y2kxSOW7is7DDYr2knsFkw==","signatures":[{"sig":"MEYCIQC0C8ZzQ9GkG13M7NecjlW7xUk5MQ3O0Rsr38Z1xvno+AIhAJ2iuLj6gvY0MMARwwrlgiosHzTrEwO0t8sNwz1Kjwta","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/eUDCRA9TVsSAnZWagAAxfkQAIxj37NeUutoXz8wPOna\nN/uFKgWBR8yuod5exww3ptSyYd+ZQrMVhNsMtzWWBFom/WEMK1b6MsoaXxZY\nrE0yRLiyfLALB+nwrnxEWYg3nSMYFsBzXXuGG2/WJe0efoeTv4EwMDAbEaZJ\nAS6L+DALyeEwX4tthNELcll/9wQ6cUVMZ3OCSAH5ESlg9xAp6Fb2BQ7r6faz\n1uc9L4AI+xLOHQdbypcgM9TbyFT+92NOr8S9cNdUhqjdoaEl4F+cA7GCGVfX\nAHPCu6Eaz3qdPrMwwNsygBezacAnJ+2rjh/sO2nj8sIjWLlzoXSZB95O+Hj/\nxUWiflZpAOtoEXyAJpliZ1wUsd+zcxv1QSQcvqGH/+zSyBNYGXwoiNJWNkJF\n6foKN7YWBKdmj46vfkdAjfKivDkxvMjOCaQyYdPhPi3RKUjP//JRwEHOO3oc\n5sA3kvQB9TSRJ3JscVbIN/ul+7u7n3psHtf0rYgLTPRSZMgKBHyUvtR/HzG4\n3fvyL7kmMIn8s2E43mEM9M13LAORxfMMieWlnLnvRwT/bm68Xu7aHOLKsAvF\nXPZWF2ERXGxF2W9spKmtozV8z8YUhD38RX3NY3em5U8yKxI0NMnQHNHkZDn+\n+liFpzI8ejFACGaZaOv9Jk9aTRnIKDe/tVfaJaP+6l/l+5g4H0uedEz5+epu\n4OEd\r\n=FljU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"2825bb681c3179cd02c63a14362583e2b08cde00","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.26_1593697538822_0.03821236834966513","host":"s3://npm-registry-packages"}},"4.0.0-alpha.27":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.27","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.27","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"83f1fb72a949e455124163a6669230d1464ced88","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.27.tgz","fileCount":39,"integrity":"sha512-HqpfKI/O9JHNLNgqSkcmr+7Is/n+txATTrB/mYzpYYxPy2VPAjfn/EviL8TejRMyW7oHx0amchdu5KMpGAeGUw==","signatures":[{"sig":"MEYCIQCXou26oeFyW+yySRYNZ/C3JcuWf49QSMO9mjhiv2kn8gIhAJIN+Lvr4OKO4WiKFaKMSQKVjyhx7wXun3tmQ/LEoVFd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/fDQCRA9TVsSAnZWagAALiMP/A+9bvLKSy1iMKHY76UG\n2ZrPTvxvfvRGxm/7bw1chZ8T62IDBwHlF5j7d+VuMwdTRwYBW7HazjdRrbo0\n9wWZOhAIu8KrWpm9GHY2v43NElpT0CBl2P1/j82wCAVPnmoh9g7uS7do1F3K\nL5fwzxr4O+FusCqCXMCyJohWDp3u5O1hXib8EkIXldHbn5DG8qH3aQxy5QRq\nSD2kp+BEu9bNhT3DYIG6OGpWknQW6W03KlThZNhI75T1g1YcaCyCqXiP2fNk\nHsiWiapVHRmzLJc4rHe1Yg9DyI29h20jp++/kMlNhwYcDS6faEEZInhpgz6r\n+XSEdufR9d5GSVbocqDkzYYb+DI0E7nZ+cCvnbQ5ncZceowWoopSlgfDOBr+\nKc9bcwNLtqD/3usO95cKseMpJPIZgYoo6EZQaYJqHBtySrkexDqxqDFPFlts\nLdE6dUyw9TJh0v0JlOqX6Rb0bWqeyAYUfnTwfS1fNxfi5ciuUDao7utuca2L\n0nyPDSVkRMslzOnpKx8S6yYtCpw8BfYM8/BH2lR3+M//yLZ9zCHaerw1OzZm\nBQP1LZjTCsf9EW5JcVJLbL+Ms6CL11GTHRDZdkQRC5RTCy3wRFZYi47JJ2cn\neXP9xm4wZRF4JgGWXdi/wdet8CBMqf6OT2umJ2d3+WPyxziTpK7bD7ulaqR4\ni6Sw\r\n=y5Bp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"b70940d310293e276b83b0776924d521fd2ca08a","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.27_1593700559753_0.6209414163124609","host":"s3://npm-registry-packages"}},"4.0.0-alpha.28":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.28","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.28","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"340edd70a3384759338e15348889cfc045bbb093","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.28.tgz","fileCount":39,"integrity":"sha512-LscP+6/qJE7lvaEsV8/NwF62/vYtfq0HeDQeBCl2Q8zae4PCZsBJSFEknk9oYkVPki5IvPzpffe5AOZovoec/g==","signatures":[{"sig":"MEYCIQCS1v/AXnsbuXgXYMeh96/d6Qh0HqBwj36/d5OPcm5KjwIhAIAOQhymcxDOuvlSQX8hJai/i8nWYn23MezSGDZL1ocR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/hOlCRA9TVsSAnZWagAA9sUP/0h1cZZzW///WIxF/JNk\nRTqX0+mp0z+D3C2sH52KJh3H6+qfI5UtC2WKzKjWAc+b8rralhL7sL8PM6WB\nCas7VEyMsPYiOIB9pratT49/G+0wAz+2h983Q/0ULiUzPdPBO0Xvptf67tQy\ndyeyTWXkr3VcIk1HpjPqamKIoERJizR5guYDPjzVbv6UMQVuC3AD33nQzvA3\ndg6ISEGli0WuVDeRcFew3S1nzt3Ol+J9dRJOMPw9bVucIizFY7wL1u6nv4Bk\nNNC/s7JrYLChtxScrLVj+8GsSTXMy3x/xZsuMORWxbYXBbAv7lnzrKmPi0tU\nTIjBYGdeFKF63BCrif2t/P36nviFTRkFipn3aWhWB3aW+8EKW6rNkt96td7M\naVDU0fLAMQuCyVeGGdZKlXfk7mrRoxKO29cL6j5TS/DQG++VdP0EFGGSsOLJ\nyy0TsAeV8SjnRwizwM74GeGG+D0TC+8w6WgMOXRSDxqQxJBOPcdRVC3MRhXV\n26/P/K018LqhIe5jOYTnKNnC1JK8kg0ZlEcXRXhnadmlhhRVrT8ndAbTfYXw\nSIRVuaslauVRQvU4OzEh9WrwlKT5nkDzEicEDGtAb0AQp1S5bQjv4j7xtN94\nUz2HTphFhZ5tML59iyHBHSRBd9kcYOoRk2aYwyM4ET3YwZk4DBVPAD3vs2Un\nXhEi\r\n=KhYG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"e1076426fcb970e62e25a2a0ee661a00acfaaf41","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.28_1593709476820_0.47725249002952386","host":"s3://npm-registry-packages"}},"4.0.0-alpha.29":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.29","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.29","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"905905d3d727398c2696375ac794b0c5c620a66f","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.29.tgz","fileCount":39,"integrity":"sha512-7w3cdTaC2o7LJNxhyxUR4ctf2Lb8tclgfvSS1R76LnriFE89l4+DyahSVsZU1S9C5POh4zFP7ApWCpl31zXSLw==","signatures":[{"sig":"MEUCIAIT8Vl8A2xV1ivPB2jAgMYrkWWQ2EVdGv0fQQlq3oI+AiEAmH/1c4KYZ7O16n3yl9iwHdYyK2P2W81p+lUUpQveCb0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/kVxCRA9TVsSAnZWagAAZD0P/0siv74+Qt9DWo3gpE8o\ny5/ia7YE+15Unfk+apQILqf6vB16+6N/lKX+qs2nDwTiW78pi26SgNDZ6W1l\nr7jRrWsF8R0xfZPxseWIAeYXSG9dioAuoD8qn1dVOPhL2Htnwma5scGIrWol\n508EnOEkhpEMl51r6MIZamS/33oR+2eOsPHWWefIBJQ6p5Bo8uywYitJAhc2\nioXhg4MGvDtOxeayTDvrf4gq0ELlMEwbXkZKocgKLbXFkiP9u8JttCivfOM9\nzoQJb0t7gsXLLSUEp28ht9m1IxeMczxZdQltTravZ3P7hxXGkVWhcjAgk9bl\nL9csZgdzGDOX4pF93HYoQCRRYJ+NfqZzfQM48DuE6r7eh78F7uQe5MoIA5T/\nwGbMDzjxhigY3H3WzZ97c5GWF2uuyYhpCQIzl0urBldrfZi3fu7+QawsbvwD\nHyhuVqo87yMeCT6ckGgvVkUDs23ISZ2xKhwfYzYvJRwIYgleqR7WWztwbuKN\nip+KNYUD4BX4Ks0X38NIwmkfoxZmi/EsgkbmXz0RXqH6dyURAm5W73XjNcxs\nkPS50ZRIZywqZawBJZ7hAsnaRgMQctw59STSXDAMExLUaBIjXq+GK/b+gdyj\neSWW+yosbButbJHFu7sfDbNUQUEsfV+n2U6W9w1Z9hSRI6v8ZriRXva/7O8X\n3xph\r\n=MDun\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"e632d0f5b4424359cee2df6ac0f1a2e23cb14ba5","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.29_1593722224935_0.43138886354146067","host":"s3://npm-registry-packages"}},"4.0.0-alpha.30":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.30","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.30","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"5e6e57aa4afb0933ccdf1e9d6620d07a0ac6ebb0","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.30.tgz","fileCount":39,"integrity":"sha512-LokkogDuw9tKtO79c5EKnycKBAWq37tVgmdzaH3l9mxmZdhJf7y8POpv/4+Dzn4hIPQRWoKZZL/7BRR7Z56FYQ==","signatures":[{"sig":"MEYCIQC5Yzxsw3AUacWzWoJzKwf07IH0a89zARjDF4u3tbyP0wIhAKXmi2lQdX7wB8qRIfkBzGLgtLkttumNzqpv3L3zt3pq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBxS3CRA9TVsSAnZWagAAYzwP/1YXld1z9C/dD6XGJB8V\nwBbHzAsZz2F7eY/ImPa5cjYFATgDe96XTq6XODjdI2qclZBWwD09hLuZZZcn\npk+GE6EPFhEQipsGSo3xZfTnOFK0bPije90uE72jJDwWTB1mG8Cwu+x/BtXq\n034zVq1mVlrdBCLeqJhFKhlxBOgpLfJXLXUptuy3fzl2c3V5JrvyxiACMEUT\nhhM8mxrgSdCKJSUVhmYEjJAOfMHXHswiP4ymbNf6Ef0kknXEFLwhNsqw9l+8\n13ciuVuAL2Rq4hH9vrH9o9UoGqMKMbYtkfLmvcci/kVDMYwaqvtDphrUbOUH\nnuwlGsvhuEB/FCoirMRHgR3v1eUYZ4bRm5U3mgtStHSXiE5X5N5VVzBvvn8r\n7jzs5tpSq/TX+k6FAAqEOP0QYUIwK2F78bHRDFz4kLl0Fhwm75ZaWdrpE0r0\n2k8yqpdEmO/P3hE3+w9gQjwkQuo73a03RjuCkQ6s9ofCJtaW/WwnlqCmfHLn\nbN5Q3f4N3QQwul+N3aler+p69r1yhHc30gXVC3LonsJDIxeCzfvVfviVUfe7\nxX5FnfUQ2GidKQRlok/3mT/I3zpl6gAuIWGC1itZjreNYWoDYIyWS6JXb9/x\nJ3ZIMNkMXl4e4FBJ0oxTfHQBNwaTywL8wvFuq59h6CR7lpAkUBdorGBNWT0o\nQJ4Q\r\n=fc7Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"4c4ef7af29e3d39c8bcb7704dedff035add854a4","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.30_1594299575122_0.05675661354374473","host":"s3://npm-registry-packages"}},"4.0.0-alpha.31":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.31","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.31","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"27d6b2e022d98f7b47920d08c34a13ec970a213f","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.31.tgz","fileCount":39,"integrity":"sha512-FWT4iGsUNIFOy1+QILWInGQ2KtW0nCJo84ee4ArCsA3eiOkGLGASRCMlebNv1VzkoXQYTnBFKnG/7XXyilrbaA==","signatures":[{"sig":"MEUCIHe7e7KnqBvYaxm9PwpLwXzLA736xhtgt/UicRWZG6XaAiEAi1Q6G2AaDs9HlDtIrx25mKGF+Cp+M29lCIAUjYqnMcA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDHMDCRA9TVsSAnZWagAAKWQP/0yndsdrJAdKIYW500y1\nXzLvP98B/OELjnFvWLSZ7mpqXku5X8lhxbF33vEZLO94C2Oi1sejmkE4/M4a\nr7W3xFFDu0D4QdUkfi0nf0FlrUzldO/hQYwGMSpHd3oQnjSDiq2Fo+NgbWmF\nbxhEaWAZZ+1JQmSVjFtQyDwMT5uQMep9m11d0TtDUgvhWu3i4VNC8Fij9VAl\nMR62Jz258h1KmTB341u4UzRVt/xNZV8QTJNC8scCXDA5V5ZHbqyDJ6jPThJO\natidT4aP/ghNF0z93v0kVmjtarRaEcHyt2UEKnfz6JSCGMFwpAG7EmAQZl76\ni2kbmde9DvmYo8Sm0wkKm4ZEetjPCzQziL+OtbIptW+kjTX4kjfDwzzO5xl1\n8xtESuJoRL84gWJ9JciuM+xyg7Isz7E/No95PhmdvOqfe6b5r2MA3MGyet5F\nZqLv+Sjn2qMmsLo1e3VTDH+kKZ3YfUI9OSpPSphtzgOzg4yRycxWl5kf/HpJ\n99Vpxtta/3aXFmFW485ONPwYLsL8iHs0N/O4GagJVJ+HDvJJ6hTg/roL+QzY\nPzmUwdCRWs0aP9dlmamEe6oe+IuOGWAARKlKkgG4K/cqW/jqVUp7ECUVjL1n\nAj56jwyuXgc/oy65VFLF8iYbNmn9Vcf1p/6vtFw2FW+4MNThGefgWDXADSNa\n8qKA\r\n=pvT/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"e0734879ad83ab3621269d54ed038983c51fbc03","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.31_1594651395402_0.5648769813992827","host":"s3://npm-registry-packages"}},"4.0.0-alpha.32":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.32","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.32","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"b92a6967ffc9160d7f01c97d825ba394179d332f","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.32.tgz","fileCount":18,"integrity":"sha512-ijdCWS4kbfNXeevGXMHaDqDSjmVXXdv/fhXMeMrvufaZBeW/vadO9i9AAEEWGw5NGgPoZX6hGj1iCZFMWMhpcA==","signatures":[{"sig":"MEUCIDtr6CGAOJAPco/1dFszGscJrIuH/dFNmMuIqEl30sGBAiEAiyXbcd51L9a6z+0s9vDVyjGh9QyGeMyIZAetDyJ0cZA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDHyKCRA9TVsSAnZWagAA9PAQAKSdUIS79tKWgKZ9jAS1\nZ0Fh7mHBW4C2YKVxpbMde3iRMJfTaTl4u4kWglsEIN68nrd3Ed8gISlv0Xer\naddi/NnJ/5Bq+A2k6pP2+g92jMRG5R4GoMkwkDnxTYYkylN5/ttqw58Vxmf4\n+tdOowMDQA8UjjJbK/Iu0J3r+cKLpGw+wDsawGu0DbOIq+It13rmk+vHNzuM\naOJdFfH74HWUOYkCA7/BsmDghBi47E3dXkXcPEp7lQU8mmw5XV0KNQCBKdcG\noHCX+qpL3Z43G3R+XHUqkkDuRnc8iFbJj0oeBAJFjydx9HZbUD8rheZtOuOw\nR+Uwd3spgpUXVd9hb/+UKFFCHe52BXSOeNFSMZ7assKgCcBJv1tcGb+FRqkw\nCszwkrRlSAk8vOhr4Z7DwFW2b9m+mA+60aIZ1W9z/9SZo1ek8cvlLjaOIClA\n1g1BE30JeTBsXkFdlsms5pZB0QwzS3PEv0j1DwQijQyASoR3uwkDsZU+dATZ\nXUuxqpeA6HI37+3X3Kr0cyka1758A3yKHqIdUzyGn5lbFzleI+vXDwKn0xSW\nNgAFC6Bs0kA/hCQYiu1wd+ixAoVgjO/eeRTovZvub/IGjUD7EI4Wkcb22WF0\nPLWt+qGgs4y7xsDN5OXRPuygL3XQ4mu/M5ugOAK6VVGyrjzRy3Nu5O9gJaoc\nrSV4\r\n=ptk0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"49512e5c01c41f1a5f3259515ef7a12f7fcbefd2","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.32_1594653834491_0.718964339564582","host":"s3://npm-registry-packages"}},"4.0.0-alpha.33":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.33","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.33","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"a69db138e26122e7e5981342159e6f1ff9a33761","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.33.tgz","fileCount":18,"integrity":"sha512-Te8npYf/EE2+RP8mNfynU7VHxxiGW/VE1NFOb0kB/d45sghgOY8GNYl0vsVhNTwvWd/zpgH+uOJhSX+hlcWetw==","signatures":[{"sig":"MEUCICPJA/sXDsSr+S3F01T8DKNDUDCCclGTN9cnYV+cVblCAiEA90gw20DsOTiN1t8XINV2M8TMnjLXPJQNdjsSmXVMct0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDLKwCRA9TVsSAnZWagAAENMQAIhj5keMaqPWWZWfmSWE\nAgQwJbA0sd0RbI0kQGbgzuacuM0QNJ/HJwx4uAxtBi8lcEbxYUcqkBpldElK\nOscn3MvZ+dhNMWexj6MGv9e9hMQ2SMCMMkphMCNIejQNp5SWWOUN+3fAj8HX\nUZeUJpKIV1cSozjfCvgLhnUzZejDo9at+8gcVA+52+hgOSDOLDfeGLZEf+px\nqUcAIIq28XrxN2ui3TObwcJm4LGQOiqMJxI0OrZqc71z4TE899GZwDg9ixmA\ngp/KUw77vdjvswjBsWxxRFRyzdtCd0M26rgCO9K/g6BbduQxwSi3aodwNO+b\nV9bnMPdUoFTXXsEgvCEmRXZYDepDeaU2zaH2ehA1M/bfILUFvLf0+8kixnJI\nevPWnHHn0T5hL2z5A9kKgv0th/1vmb2o6LTeGUGmSPPlhW+7iTwTbafGueBi\n8YrIY4YamdruhXX7n30yylffeGRWfN3d1nVQvQ/LULalt6Ym2WZJXTeWkYf8\n+mEj1FFk1Sb5iPcOVSQb5xBkjkhfIJCwpsRnDfMB1wtCY2FdT/J6huSms9dS\nd3U9RkkycIhhq7dc0SE6AInYG+oaxVsc8bSs3A7FJTKBZF03jr4sho+u1/m6\n9J3Sh4CiWGqwb9AVXZ4V4dKyL61xsaiuAN/WyzM9Lnh2RyIppXO6Lbk9nTrR\nL8YJ\r\n=uIoI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"b9a3a3d2bd1fc5c8a749dfa78d1b52f77756bca1","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.33_1594667696405_0.2440172534659999","host":"s3://npm-registry-packages"}},"4.0.0-alpha.34":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.34","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.34","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"c77eb6eabfbba3b371050f708ffa19408a209bae","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.34.tgz","fileCount":18,"integrity":"sha512-GwgLUxrYwE8qEa7560IKLfFaNFbHK7iAjJW+MvfYZYmvHNMKFgA2W8h5iPJFO9hrr0bMWVB7fUIOrMsAhxolTA==","signatures":[{"sig":"MEQCIGW/b74xamuTVYjFpCWUyyUrs9Six4XoBZEtHu6hEppLAiBUTprzqtj+Wua6JYX9z3ptuQcOclhFGbncw2pqis/8cw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDQlBCRA9TVsSAnZWagAAMEAP/0mWV6USvleKRXYveWI/\neEofjsXmsn1CZBbuw0BjwM8ZEv3+jynVKEcknKnYBNvkoiMiLBzePu2ai4PS\nE5kK2DH4ZU4vogZ02bIOH0fHzIcMFT82H1LMICxdnpQ5FU6/uDHMp2bEjFsn\nH/p5d3IUih7W6Zee3frzKAiLANn6+FZ2qY7P+OWHYNwGLsaWb22Hi/HVyqLZ\nQ+SZFbExi9Eu79BYLqc1owr1Ljz9cKAqjFuelIncQZ7D3UZTjYIY/PmQvVvG\nTyKpxJ+dTgc9xBbb4e5iLulF0OBX+Bss7Ijr3qVx6B3PJzwmGFGma3UrfgqA\nkKbJS0PfM8WPa9S1+dFww2V3bo5WpkWDUzujCeMInLLLKmobntwyuhZVSr6S\nrulCsbWpfvxTGOvN/e3kvA0tSoDIgrgyYx+38LYswrXp2F7wU9tDA9jyG9ay\nhQANujyVErGCzEJp0p7cL69FUkWbKJjARMdCqfraCLU44n17GUuBLe675HGN\nbz4TsCSLvA80UUyQEVjSVVIUKcdwG8LxgMT+UPErEY2E50K2xFwPSo69ey6t\nMNFGQr7s7i8YLkciZqIzQ/q3l9qp1Tsdky1itH7UEzAxIZioYPed8xAW4qFZ\nJkKEWmT0EDWlKtWroaA0Ly72ETGjV7BaCCJm6pFi+YpAaOPL7utpdSU44sfB\nq/8G\r\n=4m6z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"a9ccea6cf7f152daa016f5ccc9fa85222ab9bdc0","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.34_1594689856474_0.2622921866943191","host":"s3://npm-registry-packages"}},"4.0.0-alpha.35":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.35","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.35","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"2a6e888ee9a1f0c0927afd22c6cfcb16946b5532","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.35.tgz","fileCount":18,"integrity":"sha512-1+9+njdJliQq+hvK6zXcMmcsqpP++20tLS5fFtMq+m+UoAyoQT+tTxzqMVdxRBOaTgKsmSHKM/g5k6uO8WP5+g==","signatures":[{"sig":"MEUCIA5N5kIZib2c5mHauranlx2KZBWyAn2LtMCDUgQdpSQVAiEAkxLzgcz/w9mj7rVEkvhkFKpbjAyEl6ZEiXVMErhYioM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDkdnCRA9TVsSAnZWagAAk04P/jodNOSmnJKE01QYmXUR\n32mtp0N10GcIl6FSxmYUT7RrdiWf0ecL1aw9GwcUF9xc0/z1lbTsf9K2N9Dq\no8lbuaSkW3pTnq90zxJKuweTCN2pMiN1fiahrOOYyH5G/H/67soNaXE7NYth\nATwr2mQDjSSelIqRKfLla6Ye3T5W9LYFA896OzLqwJFg49gzBDwuqrDuvQap\nn3v3EFTcMdXvx29hdnOiLULor7TIe31jXvG512FZ61/1Xemh+Wzq5odTuhGY\nAyO32Y1wAQmpGr35KEoPRJbAyoJIMiCDJZa517ZEHUw3vSIU9rwHONy7NO6i\nxgEIlxtA1Sh1G+/koKvc8i+cFgfEAt6RSVdQkVLuowNV5NtMxR7+EntFpeKF\nD8v1TIHtOclm0gF+OlMGaRQ9ehpiRP5EzAdVc0S8l3NXBWbi7kYB77MzU7Y+\nGfJ2s2y86I8VRmOwJIo3BU0+wrr38CInzzFjUyMfdUkxwu19kZceAmzN3S6M\n00jkVK7VjNuILAdWSx7iv+90W+Cstno+qjd7TQ0BKTuBxu45Ra08Zvd7rjR/\nBPPWboi51QWfyZoqt/Y8S6FcRh6tXexw1DmsxC1dGTG3Tj6NEKK2C0V52KTN\n4Md9cRaB1f0N8/cfgJK8gaIrCBlGsHL0qBBSW7xP/MQmdLG0yYAo2Caj/1WO\nDMBI\r\n=cfXy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"734a795c2b7b6478ba9c3586d4489a04244a7011","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.35_1594771303337_0.6579137076677901","host":"s3://npm-registry-packages"}},"4.0.0-alpha.36":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.36","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.36","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"ad175260a175954eaf110758f0e99e167052e143","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.36.tgz","fileCount":18,"integrity":"sha512-dotlNq97nwzTGS28jUhWUiIenUnfXGrXE3xeNbkpaCjcUG799gNwkc9D86HRhiLpSGws/Q+cQaeLikrl5No9QQ==","signatures":[{"sig":"MEUCIQCErM1HYflmAnBdM7iIIi9w8p0kbCEKQmHKWimGTxO6HgIgMbpwb5plnhva9MRKU6cHwNqr+1otxCTj53z2AOg/0FQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEhCHCRA9TVsSAnZWagAAR40QAIkdnMKHGvWfHWNLrXwv\nSlXixY4nNWcUitxpiM5eo8T4a9L4c2g5OY0TsCS64JwsyD1VKoEa8XxvmYms\nsRdzmuBrOXcwBEiU3FL5bTjk2cNnRf1KlzKek7FEGV4vXGcjpo+Nb9ydLCLF\niG51ELsYzo+y8+D91qWDJYxzg5ZDeujUR+LqaR4+mNwUBKOtESUdue0UkJlU\njlJxNlQxcqNud6vB8b+Jo8aac6c9iML1eCYTieFYi+/p3qFtLZz/Z5SudXHo\nziSCmbct6GaUIhmW73d0iKYAX/DNDgPrjxDAkIF4rbUpgvwHD/BMyzDgQ6DZ\nATcZzl1x1YspXoQNV7QEuNaPMNtdv+4Gkjpaw0SzcIJBac8cd91E4WzW13Ko\nJv6/9cezMNZW/JZKSK6evKHPA9Lnply0Aia9P/kkLTA+hJUwP2R0LH44zCHJ\n9WQN9dpU2SiUvuK7efkcWo/4QtQtJhR6rTiP8Z6y+hdCYPw6vHvjmO5IWsPh\n8mlb6XN6ThE0rhXnYmDdCg4zitpp94sZL6tjhrEUgnXQsPhRhQiDhyfQRHN9\nTTogh+Obbr+VWTDM/ZJRZ/a4bXBpF2bZsJ98ipTZmP93t04T/urrK1hCyryI\nZhAaaT0d20rf+osUY6foBksA1/cfnyPFkm4HQT4+nfaVjZTY2Bw4d7E74IR9\nKf0N\r\n=L8Fv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"3cdabe3364ea72dc5fb0f02e8f2c273ef16dd26d","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.36_1595019399161_0.770038138271343","host":"s3://npm-registry-packages"}},"4.0.0-alpha.37":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.37","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.37","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"c70b1ade5ad0db76fc6feb09922e56e24f50ede0","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.37.tgz","fileCount":18,"integrity":"sha512-3H4FQEl48Ad8hpO7l8ZvzU9d08xu+ByAFB64bjILtLDBeOG9ubKAHvVnUw3Ao8HqimI19gK5TY/0YJejhsGweA==","signatures":[{"sig":"MEUCIAwO2trnvHcn+y3zZUmOIo8hpgGdyNmPDn14IfW2xHqUAiEAlKXmDWjnztA4tTwln668gV0SF9Y0Ty9hm1OpPP3fmes=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGa45CRA9TVsSAnZWagAAou0P/AzA9Qwa12JDwZ9baARN\nrwvPeaaMFOhDfOvrTmzoyLDLEXk3sRacJgzJmzppW5y7M7xeO64b/nv8sctV\nkw4EqiOJmr7+TehKbSpjChWDj273u3eyB7oIntqh2cFwXMsMG32MeLZ+iLis\n/4N3s03UsANRaTWxYkdj9Dl694afWR7NOf6wJnTYEDNJLGkIhZGGJqkIrqSl\nfPBpoRXX3DIXhRJkp6FiWIYasfEZnDuaP1vmsq3A2sdRjB3lrnoTBAG6q5x2\nmA5FAg2zcbf0b11kGWEFlpa3tCiZYRg7db8tAl1T9jeiMG8RXLK6RPf2+KyE\n5bkHVn5dt++YrZltvesou7gIQ4M9pD7C3KGMAVqHSXuem2wxgIsORqlThqLe\nfE5GB+6EWcYXURqXbUG+TRBe5XjhtRpvmLHQO7cN9eqJ3uK4vcePWHRN0/zP\np4qRpBQTy6RaAst3IJ311JQ1P+KsFCwRNLtJJJBFf7I/Ru0k3r1DsQCYEKqV\ncUVd2fbsC9H5vWKNZ8OrFfvsvWedougozNFUaCQl/tuktRMemX0JUMRlioq7\nK1BVVn7+VrZg93LChlx8Zn8HP6qpzsSiRZl4F4TckT7ranyCpDIlTKOiBw3a\nyUTGWgm79mhrb5XiQXGsFaFaMD+62I9GZcdxt499WeEYaF7bHmR9zjjwF+yv\nbOem\r\n=M/IV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"bbe6295e667853eeba94d6ed8c9a3c8e06e4ada1","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.37_1595518520801_0.8179912499039987","host":"s3://npm-registry-packages"}},"4.0.0-alpha.38":{"name":"@axe-core/pupeeteer","version":"4.0.0-alpha.38","author":{"name":"Adam Cutler"},"license":"MPL-2.0","_id":"@axe-core/pupeeteer@4.0.0-alpha.38","maintainers":[{"name":"dqlabs","email":"labs@deque.com"},{"name":"dylanb","email":"dylan@barrell.com"},{"name":"npmdeque","email":"axe@deque.com"},{"name":"wilcofiers","email":"wilcofiers@gmail.com"}],"homepage":"https://github.com/dequelabs/axe-core-npm#readme","bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"nyc":{"all":true,"lines":85,"exclude":["**/*.d.ts","src/browser.ts"],"include":["src"],"require":["ts-node/register"],"branches":85,"reporter":["text-summary","html"],"extension":[".ts",".tsx"],"functions":85,"sourceMap":true,"instrument":true,"statements":85},"dist":{"shasum":"813941d9b853e4d79a4be1e5fb1a9047b5e83657","tarball":"https://registry.npmjs.org/@axe-core/pupeeteer/-/pupeeteer-4.0.0-alpha.38.tgz","fileCount":18,"integrity":"sha512-MfoNvQnolllue4K/eNF9xqCjwfV1+hmJvw9oGhZt1oWQbXetaI8Y7xO6K1GEauYDvtVcX5LLE5d3nloZhlxePQ==","signatures":[{"sig":"MEUCIHAXinxCGGy7aTRTSiPzR7Lt9gAcLDyxRPWgULyPw7+jAiEA59r7oY9qDGEFZRULDiE9BamKWvmL0oC8ArYokFUWvyk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHu++CRA9TVsSAnZWagAAiBIP/30h7BzwYnQWQv47QgqJ\nDZAHsBrs08XSNMyHmsKv+LHxCidey0eI3kVnhEz4t172MJu6Y6IuKH54vM1i\noxvx8q3h3rs7GFuiUhEKe664vZW5+c7SXab77S18HMVdtI+qKvUrrnQb9HaY\nxyBkHqxm+p0QhgEfOtqO5ExTWfRF9fliXYDux32CXJi+uJuoQltuetiwu9+h\nwUkOfhxcGUImoz2wK69cJ4JE6lkNxJsAqwQYqu+UQvwvV+tGSRmqNSC+Y5jY\nvrkJdbDaXiakUGGqestP3kszB6vu3/Ewaf/jhv7k5Sgekg7z7UMRPmePHAdI\npM22vgKl+6ZebaneQfC5gpPc2yKmfkb3/FzqGlyaFeQBFhP3bT50qDP20iFd\nd7CermJ4f2iOaqsuEnt8JcfbPFaOu6Hei9QEftxIuH4HyZqhwIgfonZVcY20\nOdSpRvRzH3vMa+6SDuAkUZRXn/YQe6AgHU/thefqz9AO2Q8lR6khq67kx2b0\nVkP5NRyNT2ILjEcvr5hw4o1bBPwn5bvjuK2z0vyZXf7u9vCFEihsuAwqZPwO\nkbs59L7V+YTz9Crj7Ui8JeyomrOBhuaShtQjQ9DJTlgEut/zneuMgZWFrClM\nzgZ9HWuVQDvTaXM7Rfjiy1BVYH81952gIDRXhlPIqkGPPMNg1gzdfI1CKB2w\nyDGH\r\n=icYx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @axe-core/puppeteer\n\nProvides a chainable axe API for Puppeteer and automatically injects into all frames.\n\nPrevious versions of this program were maintained at [dequelabs/axe-puppeteer](https://github.com/dequelabs/axe-puppeteer).\n\n## Getting Started\n\nInstall [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already. For running axe-puppeteer tests read more about [setting up your environment](CONTRIBUTING.md).\n\nInstall Puppeteer: `npm install puppeteer --no-save`\n\nInstall axe-puppeteer and its dependencies: `npm install @axe-core/puppeteer`\n\n## Usage\n\nThis module uses a chainable API to assist in injecting, configuring and analyzing using axe with Puppeteer. As such, it is required to pass an instance of a Puppeteer `Page` or `Frame`.\n\nHere is an example of a script that will drive Puppeteer to this repository, perform analysis and then log results to the console.\n\n```js\nconst { AxePuppeteer } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n  await page.setBypassCSP(true);\n\n  await page.goto('https://dequeuniversity.com/demo/mars/');\n\n  const results = await new AxePuppeteer(page).analyze();\n  console.log(results);\n\n  await page.close();\n  await browser.close();\n})();\n```\n\nNote: Usage examples make use of ES2017 async/await. Use of `await` can only be done in a function\ndeclared `async`. If your project does not support async/await, you can just directly use the promise\n`async` functions return. [Check here for more\ninformation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n\n## Bypassing Content Security Policy\n\nWhen trying to run axe, you might run into issues if the page you are checking has Content Security Policy enabled. To get around this, you must disable it through `Page#setBypassCSP` **before** navigating to the site.\n\n### loadPage(browser: Browser, url: string, { opts, source }: { opts?: any, source?: string } = {})\n\nAn alternate constructor is available which opens a page and performs the CSP bypass for you.\n\nIt closes the page after `analyze` is called.\n\n```js\nconst { loadPage } = require('@axe-core/puppeteer');\nconst puppeteer = require('puppeteer');\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const axeBuilder = await loadPage(\n    browser,\n    'https://dequeuniversity.com/demo/mars/'\n  );\n  const results = await axeBuilder.analyze();\n  console.log(results);\n\n  await browser.close();\n})();\n```\n\n### AxePuppeteer(page: Frame | Page[, axeSource: string])\n\nConstructor for the AxePuppeteer helper.\nYou must pass an instance of a Puppeteer `Frame` or `Page` as the first argument. Cannot be called without the `new` keyword.\n\n```js\nconst builder = new AxePuppeteer(page);\n```\n\nIf you wish to run a specific version of axe-core, you can pass the source `axe-core` source file in as a string. Doing so will mean axe-puppeteer runs this version of axe-core, instead of the one installed as a dependency of axe-puppeteer.\n\n```js\nconst axeSource = fs.readFileSync('./axe-3.0.js', 'utf8');\nconst builder = new AxePuppeteer(page, axeSource);\n```\n\nNote that you might need to bypass the Content Security Policy in some cases.\n\n### AxePuppeteer#include(selector: string | string[])\n\nAdds a CSS selector to the list of elements to include in analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel');\n```\n\n### AxePuppeteer#exclude(selector: string | string[])\n\nAdd a CSS selector to the list of elements to exclude from analysis\n\n```js\nnew AxePuppeteer(page).include('.results-panel').exclude('.results-panel h2');\n```\n\n### AxePuppeteer#options(options: Axe.RunOptions)\n\nSpecifies options to be used by `axe.run`. **Will override any other configured options, including calls to `withRules` and `withTags`.**\nSee [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md)\nfor information on its structure.\n\n```js\nnew AxePuppeteer(page).options({\n  checks: { 'valid-lang': ['orcish'] }\n});\n```\n\n### AxePuppeteer#withRules(rules: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withRules('html-lang');\n```\n\n```js\nnew AxePuppeteer(page).withRules(['html-lang', 'image-alt']);\n```\n\n### AxePuppeteer#withTags(tags: string | string[])\n\nLimits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#withRules` or `AxePuppeteer#withRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).withTags('wcag2a');\n```\n\n```js\nnew AxePuppeteer(page).withTags(['wcag2a', 'wcag2aa']);\n```\n\n### AxePuppeteer#disableRules(rules: string | string[])\n\nSkips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. **Subsequent calls to `AxePuppeteer#options`, `AxePuppeteer#disableRules` will override specified options.**\n\n```js\nnew AxePuppeteer(page).disableRules('color-contrast');\n```\n\nor use it combined with some specified tags:\n\n```js\nnew AxePuppeteer(page)\n  .withTags(['wcag2a', 'wcag2aa'])\n  .disableRules('color-contrast');\n```\n\n### AxePuppeteer#configure(config: Axe.Spec)\n\nInject an axe configuration object to modify the ruleset before running Analyze. Subsequent calls to this method will invalidate previous ones by calling `axe.configure` and replacing the config object. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) for documentation on the object structure.\n\n```js\nconst config = {\n  checks: [Object],\n  rules: [Object]\n};\nconst results = await new AxePuppeteer(page).configure(config).analyze();\nconsole.log(results);\n```\n\n### AxePuppeteer#analyze([callback: (Error | null[, Object]) => void])\n\nPerforms analysis and passes any encountered error and/or the result object to the provided callback function or promise function. **Does not chain as the operation is asynchronous**\n\nUsing the returned promise (optional):\n\n```js\nnew AxePuppeteer(page)\n  .analyze()\n  .then(function (results) {\n    console.log(results);\n  })\n  .catch(err => {\n    // Handle error somehow\n  });\n```\n\nUsing a callback function\n\n```js\nnew AxePuppeteer(page).analyze(function (err, results) {\n  if (err) {\n    // Handle error somehow\n  }\n  console.log(results);\n});\n```\n","engines":{"node":">=6.4.0"},"gitHead":"7e713802a2cdb8d8b9fa5b237066dab1d8f1b506","scripts":{"test":"mocha","build":"tsc","coverage":"nyc mocha","prepublishOnly":"npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"npmdeque","email":"axe@deque.com"},"repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"_npmVersion":"lerna/3.21.0/node@v12.18.2+x64 (linux)","description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","directories":{},"_nodeVersion":"12.18.2","dependencies":{"axe-core":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.3.2","express":"^4.16.4","ts-node":"^8.3.0","puppeteer":"^1.10.0","typescript":"^3.1.6","@types/chai":"^4.1.7","@types/node":"^12.7.5","test-listen":"^1.1.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/express":"^4.16.0","@types/puppeteer":"^1.10.0","@types/test-listen":"^1.1.0","source-map-support":"^0.5.9"},"peerDependencies":{"puppeteer":"^1.10.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pupeeteer_4.0.0-alpha.38_1595862973547_0.8809908614551893","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-06-01T13:07:14.794Z","modified":"2026-07-08T23:44:28.171Z","4.0.0-alpha.13":"2020-06-01T13:07:14.928Z","4.0.0-alpha.14":"2020-06-02T15:37:27.743Z","4.0.0-alpha.15":"2020-06-02T17:07:50.004Z","4.0.0-alpha.16":"2020-06-02T17:48:30.261Z","4.0.0-alpha.17":"2020-06-02T18:01:35.852Z","4.0.0-alpha.18":"2020-06-03T17:31:16.395Z","4.0.0-alpha.19":"2020-06-04T13:56:35.757Z","4.0.0-alpha.20":"2020-06-09T14:45:56.068Z","4.0.0-alpha.21":"2020-06-09T15:13:36.964Z","4.0.0-alpha.22":"2020-06-09T18:39:40.800Z","4.0.0-alpha.23":"2020-06-09T20:48:32.676Z","4.0.0-alpha.24":"2020-06-12T15:56:04.039Z","4.0.0-alpha.25":"2020-06-17T14:40:41.488Z","4.0.0-alpha.26":"2020-07-02T13:45:38.955Z","4.0.0-alpha.27":"2020-07-02T14:35:59.917Z","4.0.0-alpha.28":"2020-07-02T17:04:37.028Z","4.0.0-alpha.29":"2020-07-02T20:37:05.050Z","4.0.0-alpha.30":"2020-07-09T12:59:35.293Z","4.0.0-alpha.31":"2020-07-13T14:43:15.529Z","4.0.0-alpha.32":"2020-07-13T15:23:54.666Z","4.0.0-alpha.33":"2020-07-13T19:14:56.525Z","4.0.0-alpha.34":"2020-07-14T01:24:16.644Z","4.0.0-alpha.35":"2020-07-15T00:01:43.529Z","4.0.0-alpha.36":"2020-07-17T20:56:39.360Z","4.0.0-alpha.37":"2020-07-23T15:35:21.200Z","4.0.0-alpha.38":"2020-07-27T15:16:13.835Z"},"bugs":{"url":"https://github.com/dequelabs/axe-core-npm/issues"},"author":{"name":"Adam Cutler"},"license":"MPL-2.0","homepage":"https://github.com/dequelabs/axe-core-npm#readme","repository":{"url":"git+https://github.com/dequelabs/axe-core-npm.git","type":"git"},"description":"Provides a chainable axe API for Puppeteer and automatically injects into all frames","maintainers":[{"email":"labs@deque.com","name":"dqlabs"},{"email":"wilcofiers@gmail.com","name":"wilcofiers"},{"email":"dylan@barrell.com","name":"dylanb"},{"email":"axe@deque.com","name":"npmdeque"},{"email":"stephen.mathieson@deque.com","name":"stephendeque"}],"readme":"","readmeFilename":""}