This package has been deprecated

Author message:

Please use @replayio/puppeteer instead

@recordreplay/puppeteer-config
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

@recordreplay/puppeteer-config

Provides utilities to support using Replay with Puppeteer

Exports

  • getExecutablePath(browserName: string) - Returns the path to the replay browser for the given browserName: only "chromium" is currently supported. If browserName isn't supported on the current platform, undefined is returned.
  • devices - Object of configurations suitable for using with @puppeteer/test. Currently only supports a "Replay Chromium" configuration. If the configuration isn't supported on the current platform, a warning is emitted and the executablePath will be undefined.

Using standalone

If you are using puppeteer (rather than @recordreplay/puppeteer), you can configure it to use the Replay browser by passing in the executablePath to launch().

const puppeteer = require("puppeteer");
const { getExecutablePath } = require("@recordreplay/puppeteer-config");

(async () => {
	const browser = await puppeteer.launch({
		headless: false,
		executablePath: getExecutablePath("chromium"),
	});
	const page = await browser.newPage();
	await page.goto("https://replay.io");
	await page.screenshot({ path: "replay.png" });

	await page.close();
	await browser.close();
})();

Readme

Keywords

none

Package Sidebar

Install

npm i @recordreplay/puppeteer-config

Weekly Downloads

0

Version

0.1.2

License

BSD-3-Clause

Unpacked Size

4.52 kB

Total Files

10

Last publish

Collaborators

  • ryanjduffy
  • jasonlaster11
  • dmiller_replay
  • holger_replay
  • bhackett1024