To troubleshoot video recording issues in @playwright/test, follow these steps:
"off"
, "on"
, "retain-on-failure"
, and "on-first-retry"
.import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
use: {
video: 'on',
},
};
export default config;
Verify test results: If all your tests pass successfully, no videos will be generated by default. Videos are recorded when tests fail, unless you've explicitly set it to not record on successful runs.
Ensure sufficient disk space: Videos can consume significant disk space depending on their length and resolution. Make sure your machine or server has enough available space.
Update Playwright: If you still face issues, consider updating to the latest version of Playwright to ensure there are no errors or issues with the library itself.
npm install playwright@latest
By following these steps, you should be able to resolve video recording issues in your Playwright tests.
If you still have questions, please ask a question and I will try to answer it.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].