From e364ffdb931db8328b8863a97d6d228c79089fa5 Mon Sep 17 00:00:00 2001 From: Eugene Yu Date: Tue, 17 Sep 2024 12:36:55 -0700 Subject: [PATCH] Setting firefox to run in debug mode when executing in headless --- playwright.config.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index 4532dcc..13eec42 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -63,14 +63,17 @@ export default defineConfig({ "devtools": true, "headless": false, args: [ - // "--use-fake-device-for-media-stream", - // "--use-fake-ui-for-media-stream", + "--use-fake-device-for-media-stream", + "--use-fake-ui-for-media-stream", "--headless=firefox", "--disable-web-security", "--enable-web-rtc"], firefoxUserPrefs: { - "permissions.default.camera": 1 // Allow camera access automatically - // "media.navigator.streams.fake": true, // Use fake streams if needed + "permissions.default.camera": 1, // Allow camera access automatically + "media.navigator.streams.fake": true, // Use fake streams if needed + "devtools.debugger.remote-enabled": true, + "devtools.debugger.prompt-connection": false, + "devtools.chrome.enabled": true }, }, },