Note that Dotnet is different to node which is different to java.
Add a flag in the environment config called RecordVideoMode
Off - do not record
On - keep video always
RetainOnFailure - keep only in the event of a test error
For dotnet, instance the browserContext with the correct recordVideo option depending on the environment setting. When a test finishes, keep the video depending on the enivronment setting.
For playwrite tests in Node.js, video is already natively supported as per the documentation
See docs: https://playwright.dev/docs/videos and https://playwright.dev/dotnet/docs/api/class-video
Note that Dotnet is different to node which is different to java.
Add a flag in the environment config called
RecordVideoMode
Off
- do not recordOn
- keep video alwaysRetainOnFailure
- keep only in the event of a test errorFor dotnet, instance the
browserContext
with the correctrecordVideo
option depending on the environment setting. When a test finishes, keep the video depending on the enivronment setting.For playwrite tests in Node.js, video is already natively supported as per the documentation