All Projects → qawolf → Playwright Video

qawolf / Playwright Video

Licence: bsd-3-clause
🎬 Save a video of a Playwright page

Programming Languages

typescript
32286 projects

Labels

Projects that are alternatives of or similar to Playwright Video

babel-plugin-remove-test-ids
🐠 Babel plugin to strip `data-test-id` HTML attributes
Stars: ✭ 40 (-75.31%)
Mutual labels:  e2e
Tib
Easy e2e browser testing in Node
Stars: ✭ 64 (-60.49%)
Mutual labels:  e2e
Sakuli
Sakuli is an end-2-end testing and monitoring tool for web sites and common UIs with multiple monitoring integrations
Stars: ✭ 115 (-29.01%)
Mutual labels:  e2e
angular-webpack-skeleton
This project is deprecated. Please refer to https://github.com/Ks89/angular-cli-skeleton
Stars: ✭ 16 (-90.12%)
Mutual labels:  e2e
E2e Tester
Open source End-to-End test service
Stars: ✭ 6 (-96.3%)
Mutual labels:  e2e
Nativescript Dev Appium
A package to help with writing and executing e2e Appium tests in NativeScript apps
Stars: ✭ 69 (-57.41%)
Mutual labels:  e2e
alexa-skill-clean-code-template
Alexa Skill Template with clean code (eslint, sonar), testing (unit tests, e2e), multi-language, Alexa Presentation Language (APL) and In-Skill Purchases (ISP) support. Updated to ASK-CLI V2.
Stars: ✭ 34 (-79.01%)
Mutual labels:  e2e
Javascript Testing Best Practices
📗🌐 🚢 Comprehensive and exhaustive JavaScript & Node.js testing best practices (August 2021)
Stars: ✭ 13,976 (+8527.16%)
Mutual labels:  e2e
Metac
It is metacontroller and more
Stars: ✭ 50 (-69.14%)
Mutual labels:  e2e
Cypress Svelte Unit Test
Unit testing Svelte components in Cypress E2E test runner
Stars: ✭ 110 (-32.1%)
Mutual labels:  e2e
Syncano Dashboard
The Syncano Dashboard built with React.
Stars: ✭ 287 (+77.16%)
Mutual labels:  e2e
Burnside
Fast and Reliable E2E Web Testing with only Javascript
Stars: ✭ 389 (+140.12%)
Mutual labels:  e2e
Conceal Core
Conceal Core - Daemon & Wallets (CLI)
Stars: ✭ 72 (-55.56%)
Mutual labels:  e2e
corde
🤖 A simple e2e library for testing Discord Bots 🚀
Stars: ✭ 60 (-62.96%)
Mutual labels:  e2e
Dappeteer
🏌🏼‍E2E testing for dApps using Puppeteer + MetaMask
Stars: ✭ 117 (-27.78%)
Mutual labels:  e2e
dappeteer
🏌🏼‍E2E testing for dApps using Puppeteer + MetaMask
Stars: ✭ 138 (-14.81%)
Mutual labels:  e2e
Protractor Best Practices
Stars: ✭ 65 (-59.88%)
Mutual labels:  e2e
Kakunin
An E2E testing framework
Stars: ✭ 141 (-12.96%)
Mutual labels:  e2e
Cypress React Selector
⚡️ cypress plugin to locate react elements by component, props and state
Stars: ✭ 121 (-25.31%)
Mutual labels:  e2e
Testcafe
A Node.js tool to automate end-to-end web testing.
Stars: ✭ 9,176 (+5564.2%)
Mutual labels:  e2e

playwright-video

npm version Unit Tests

🎬 Save a video recording of a Playwright page (Chromium only for now)

When Playwright adds support for the Screencast API in Firefox and WebKit, this will be updated to support these browsers.

Install

npm i playwright playwright-video @ffmpeg-installer/ffmpeg

If you already have FFmpeg installed, you can skip the @ffmpeg-installer/ffmpeg installation by setting the FFMPEG_PATH environment variable.

npm i playwright playwright-video

Use

const { chromium } = require('playwright');
const { saveVideo } = require('playwright-video');

(async () => {
  const browser = await chromium.launch();
  const context = await browser.newContext();
  const page = await context.newPage();

  await saveVideo(page, '/tmp/video.mp4');
  await page.goto('http://example.org');
  await page.click('a');

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

The video will be saved at the specified savePath (/tmp/video.mp4 in the above example).

API

playwright-video.saveVideo(page, savePath[, options])

  • page <Page> Save a video of this page. Only supports Chromium for now.
  • savePath <string> Where to save the video.
  • options <Object>
    • followPopups <[boolean]> Whether or not to follow browser focus when popups are opened. Defaults to false. Note: this option will only work correctly if the popups opened are the same size as the original page. If a smaller or larger popup is open, frames will be scaled to fit the original size.
    • fps <[number]> The frames per second for the recording. Defaults to 25. A higher number will improve the recording quality but also increase the file size.
  • returns: <Promise<PageVideoCapture>>

Records video of a page and saves it at the specified path.

await saveVideo(page, '/tmp/video.mp4');

class: PageVideoCapture

A PageVideoCapture is created when you call saveVideo. It manages capturing the video of your page and saving it.

pageVideoCapture.stop()

Stop the video capture if needed and save the video. The returned Promise resolves when the video is saved.

The video capture will be stopped automatically if you close the page, so you should not need to call this unless you want to explicitly wait until the video is saved.

const capture = await saveVideo(page, '/tmp/video.mp4');
await capture.stop();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].