This package has been deprecated

Author message:

Please use playwright with @replayio/playwright instead

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

1.18.3 • Public • Published

playwright

Replay enabled fork of the Playwright library.

Overview

This is an alternative to Playwright that uses replay enabled browsers where possible to create replays of test runs. It can be added to an existing Playwright test suite or be used as a standalone.

Installation

npm i @recordreplay/playwright

Usage

With playwright/test

After installing, run npx @recordreplay/playwright test to execute the tests and record with Playwright. Only test runs in supported browsers (see below) will be recorded with Replay.

You will still use your existing @playwright/test imports for your test files and configuration.

Standalone

Use @recordreplay/playwright in require/import statements and write your tests as a function that uses playwright.[browser].launch().

Example:

const playwright = require("playwright");

(async function () {
  const browser = await playwright.firefox.launch({
    headless: false,
  });
  const context = await browser.newContext();
  const page = await context.newPage();

  await page.goto("https://unsplash.com/");

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

You can then use node testfile.js to execute and record your tests without needing to also install @playwright/test.

Managing Replay recordings

Replays are saved locally to ~/.replay. After running any playwright scripts, use the replay-recordings CLI tool to manage and upload the recordings.

Supported Platforms

The currently supported platforms/browsers are below. On other platforms/browsers, the regular non-recording version of the browser will be used.

  • macOS: firefox
  • linux: firefox, chromium

Readme

Keywords

none

Package Sidebar

Install

npm i @recordreplay/playwright

Weekly Downloads

10

Version

1.18.3

License

Apache-2.0

Unpacked Size

11.2 MB

Total Files

361

Last publish

Collaborators

  • ryanjduffy
  • jasonlaster11
  • dmiller_replay
  • holger_replay
  • bhackett1024