Skip to content

[Feature] disable video creation after context/page creation #4821

Open
@LanderBeeuwsaert

Description

@LanderBeeuwsaert

Let us know what functionality you'd like to see in Playwright and what is your use case.
We use video creation in playwright in our CI environment to easily see what went wrong if a test fails.
so during context creation, we do:

if (this.createVideo) {
  context.recordVideo = { dir: this.storageUploadPath };
}
this.context = await this.browser.newContext(context);

However, we are only interested in the video if the test actually went wrong.
If the test went well, the creation of the video on page/context close only takes (quite a lot) of time away that's not useful.
It would therefor be useful if we could change the setting just before page/context close to say that "nah, don't create a video anyway"

Do you think others might benefit from this as well?
I would think so.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions