diff --git a/packages/playwright-core/src/server/videoRecorder.ts b/packages/playwright-core/src/server/videoRecorder.ts index 20261820cd659..bb5872766659e 100644 --- a/packages/playwright-core/src/server/videoRecorder.ts +++ b/packages/playwright-core/src/server/videoRecorder.ts @@ -209,6 +209,9 @@ class FfmpegVideoRecorder { command: this._ffmpegPath, args, stdio: 'stdin', + // ffmpeg has no window of its own, so hiding its console on Windows is safe here, + // unlike for browser/driver processes. See https://github.com/microsoft/playwright/issues/43515. + windowsHide: true, log: (message: string) => debugLogger.log('browser', message), tempDirectories: [], attemptToGracefullyClose: async () => { diff --git a/packages/utils/processLauncher.ts b/packages/utils/processLauncher.ts index 14a982d66e4d4..5c00deb303c5a 100644 --- a/packages/utils/processLauncher.ts +++ b/packages/utils/processLauncher.ts @@ -30,6 +30,10 @@ export type LaunchProcessOptions = { args?: string[], env?: NodeJS.ProcessEnv, shell?: boolean, + // Only pass this for child processes that have no window of their own (e.g. ffmpeg). + // See https://github.com/microsoft/playwright/issues/43515: passing this unconditionally + // for every launched process previously broke Inspector, codegen and UI mode. + windowsHide?: boolean, handleSIGINT?: boolean, handleSIGTERM?: boolean, @@ -142,6 +146,7 @@ export async function launchProcess(options: LaunchProcessOptions): Promise