2020-06-04 14:56:45 +00:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [puppeteer ](./puppeteer.md ) > [Page ](./puppeteer.page.md ) > [emulateVisionDeficiency ](./puppeteer.page.emulatevisiondeficiency.md )
## Page.emulateVisionDeficiency() method
2020-07-22 09:04:53 +00:00
Simulates the given vision deficiency on the page.
2020-06-04 14:56:45 +00:00
< b > Signature:< / b >
```typescript
2020-07-22 09:04:53 +00:00
emulateVisionDeficiency(type?: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest['type']): Promise< void > ;
2020-06-04 14:56:45 +00:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2020-07-22 09:04:53 +00:00
| type | [Protocol.Emulation.SetEmulatedVisionDeficiencyRequest ](./puppeteer.protocol.emulation.setemulatedvisiondeficiencyrequest.md )<!-- --> \['type'\] | the type of deficiency to simulate, or < code > 'none'</ code > to reset. |
2020-06-04 14:56:45 +00:00
< b > Returns:< / b >
Promise< void>
2020-07-22 09:04:53 +00:00
## Example
```js
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://v8.dev/blog/10-years');
await page.emulateVisionDeficiency('achromatopsia');
await page.screenshot({ path: 'achromatopsia.png' });
await page.emulateVisionDeficiency('deuteranopia');
await page.screenshot({ path: 'deuteranopia.png' });
await page.emulateVisionDeficiency('blurredVision');
await page.screenshot({ path: 'blurred-vision.png' });
await browser.close();
})();
```