Skip to main content
Module

x/puppeteer/mod.ts>devices

A port of puppeteer running on Deno
Latest
variable devices
Re-export
import { devices } from "https://deno.land/x/puppeteer@16.2.0/mod.ts";

A list of devices to be used with page.emulate(options). Actual list of devices can be found in src/common/DeviceDescriptors.ts.

Examples

Example 1

const puppeteer = require('puppeteer');
const iPhone = puppeteer.devices['iPhone 6'];

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.emulate(iPhone);
  await page.goto('https://www.google.com');
  // other actions...
  await browser.close();
})();

type

DevicesMap