Socket
Socket
Sign inDemoInstall

@recordreplay/playwright

Package Overview
Dependencies
50
Maintainers
7
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @recordreplay/playwright

A high-level API to automate web browsers


Version published
Weekly downloads
3
decreased by-70%
Maintainers
7
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 17 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc