question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] Video recording: capturing popups

See original GitHub issue

Hey team! The 1.4.0 release is great. Amazing work.

I’m testing the new video capture feature, and I have a question. In the release notes, it says “every page and popup is captured”. But when I run the code below, which opens and closes a popup, only the original page appears in the video. Is this a bug, or is this the way the feature is designed to work?

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

(async () => {
  const browser = await chromium.launch({
    headless: false,
  });
  const context = await browser.newContext({
    _recordVideos: { width: 1280, height: 720 },
  });
  const page = await context.newPage();
  const video = await page.waitForEvent('_videostarted');

  await page.goto('https://hhncn.csb.app');
  await page.waitForTimeout(2000);
  const [popup] = await Promise.all([page.waitForEvent('popup'), page.click('.link')]);
  await popup.waitForSelector('.logo')
  await popup.waitForTimeout(2000);
  await popup.close();

  await page.close();
  fs.renameSync(await video.path(), 'popup-test.webm');
  await browser.close();
})();

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
arjunattamcommented, Sep 17, 2020

Thanks for the feedback! cc @yury-s

1reaction
celeryclubcommented, Sep 17, 2020

Thanks @arjun27. That makes sense. I’m curious if you’ve considered a way to combine pages and their popups into the same video. I implemented this in playwright-video here: https://github.com/qawolf/playwright-video/pull/47.

I find this to be a pretty common pattern when writing tests - a single test activates a popup, then switches back to the original page. It’s a bit easier to review all of this in a single video than having to switch between video files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Top 9 Screen Recording Tips That Will Make You a ...
Before you make your first screencast, these nine essential tips will help you create a quality screen recording that you'll want to share....
Read more >
How to Add "Pop Up Text" to Your Videos - YouTube
The app used in this video to record your screen is called ScreenFlow. It is a Mac only software, however there is an...
Read more >
Window capture doesn't show menu popups
While trying to capture the VirtualBox Window, OBS is capturing the selected window, however, none of the menu windows are seen in the...
Read more >
How to Create Video Popups (in less than 5 minutes)
As a rule of thumb, we consider that a popup video should take at least 50% of the screen–if it takes more, it's...
Read more >
Video Popups: How to Create an Engaging ...
Step 1. Find the right tool to build your popup · Step 2. Choose an appropriate video platform · Step 3. Сreate a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found