[Question] Video and Trace
See original GitHub issueHi guys! I am starting with Playwright 1.16.3 , and I am trying to use the Video Recording and Trace features, however, for some reason, I cant make them work. I could not find any video saved after the execution and the Trace just shows a blank page. This is the playwright.config.ts I am using on my project:
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
use: {
video: 'on',
trace: 'on'
},
reporter: [ ['html', { outputFolder: 'test-results', outputFile: 'results.html' }] ],
timeout: 120000
};
export default config;
The commands I have tried are:
npx playwright test --reporter=html
and
npx playwright test
After that,
I am running npx playwright show-report test-results
after executing only 1 test, it passed, it opens the report. I could see there is a trace at the end of the report, but it appears to be blank when opening. In terms of the video, no file has been generated.
I could see on the project the test-results folder with a trace.zip inside.
Is there something I am missing or doing wrong in there ?
The test only launches the browser and navigate and login to a page.
Thanks a lot
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (5 by maintainers)
@imartinflores In the config you’ve shared I still see
['html', { outputFolder: 'test-results' }]
. Usingtest-results
is not supported, please put any other directory there (or just omit it to use default playwright-report). This way you’ll get both videos and traces.@dgozman oh alright, may be that, so when launching the browser I was calling both, a browser.newContext() and a context.newPage() when opening a new tab (Im trying now a wrapper for dynamics). Setting the options on that context() I am calling is working fine.