Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Configure screencast screenshot resolution #34282

Open
mxlnk opened this issue Jan 10, 2025 · 4 comments
Open

[Feature]: Configure screencast screenshot resolution #34282

mxlnk opened this issue Jan 10, 2025 · 4 comments

Comments

@mxlnk
Copy link

mxlnk commented Jan 10, 2025

🚀 Feature Request

Make screenshot resolution configurable like the video option is.

The idea would be to allow to overwrite const kScreencastOptions = { width: 800, height: 600, quality: 90 }; in tracing.

Example

import { defineConfig } from '@playwright/test';

export default defineConfig({
  use: {
    // Capture screenshot after each test failure.
    screenshot: {
      mode: 'only-on-failure',
      size: {
        width: 800,
        height: 600
      }
    }
  },
});

Motivation

  • We would like to have higher resolution screenshots.
  • More consisten API
  • sometimes hard to figure out small text in the screencast
@mxlnk
Copy link
Author

mxlnk commented Jan 10, 2025

Would a pull request implementing this have a good chance of getting merged?

@Skn0tt
Copy link
Member

Skn0tt commented Jan 10, 2025

You're referring to two distinct concepts of screenshots. The "screencast" you link to is the series of images that powers the movie strip at the top of the trace viewer. The use.screenshot config option in your snippet is about taking a screenshot at the end of a test and storing that as an attachment. Which of the two would you like to configure?

@RunOrVeith
Copy link

(I am a colleague of @mxlnk)
We were interested in configuring the resolution of the movie strip, not the screenshot at the end

@yury-s
Copy link
Member

yury-s commented Jan 15, 2025

Can you tell us more about your use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants