Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/gfm/test/test_deps.ts>Page#emulateNetworkConditions

Server-side GitHub Flavored Markdown rendering for Deno
Latest
method Page.prototype.emulateNetworkConditions
Re-export
import { Page } from "https://deno.land/x/gfm@0.6.0/test/test_deps.ts";

Examples

Example 1

const puppeteer = require('puppeteer');
const slow3G = puppeteer.networkConditions['Slow 3G'];

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

Parameters

networkConditions: NetworkConditions | null
  • Passing null disables network condition emulation.

Returns

Promise<void>