diff --git a/packages/playwright/src/index.ts b/packages/playwright/src/index.ts index f3e11ddfaf..e5ab4b20ec 100644 --- a/packages/playwright/src/index.ts +++ b/packages/playwright/src/index.ts @@ -78,6 +78,7 @@ const playwrightFixtures: Fixtures = ({ const options: LaunchOptions = { handleSIGINT: false, ...launchOptions, + tracesDir: tracing().tracesDir(), }; if (headless !== undefined) options.headless = headless; @@ -85,7 +86,6 @@ const playwrightFixtures: Fixtures = ({ options.channel = channel; playwright._defaultLaunchOptions = options; - playwright._defaultLaunchOptions.tracesDir = tracing().tracesDir(); await use(options); playwright._defaultLaunchOptions = undefined; }, { scope: 'worker', auto: true, box: true }],