Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

feat: show warning on ff & wk if devtools was given (#1463)

Max Schmitt4b1fa2f2f904
diff --git a/src/server/firefox.ts b/src/server/firefox.ts
index d61cd4fad0..fc4883a830 100644
--- a/src/server/firefox.ts
+++ b/src/server/firefox.ts
@@ -158,7 +158,7 @@ export class Firefox implements BrowserType<FFBrowser> {
args = [],
} = options;
if (devtools)
- throw new Error('Option "devtools" is not supported by Firefox');
+ console.warn('devtools parameter is not supported as a launch argument in Firefox. You can launch the devtools window manually.');
const userDataDirArg = args.find(arg => arg.startsWith('-profile') || arg.startsWith('--profile'));
if (userDataDirArg)
throw new Error('Pass userDataDir parameter instead of specifying -profile argument');
diff --git a/src/server/webkit.ts b/src/server/webkit.ts
index 3b524b63f1..5dc8fa6c15 100644
--- a/src/server/webkit.ts
+++ b/src/server/webkit.ts
@@ -144,7 +144,7 @@ export class WebKit implements BrowserType<WKBrowser> {
args = [],
} = options;
if (devtools)
- throw new Error('Option "devtools" is not supported by WebKit');
+ console.warn('devtools parameter as a launch argument in WebKit is not supported. Also starting Web Inspector manually will terminate the execution in WebKit.');
const userDataDirArg = args.find(arg => arg.startsWith('--user-data-dir='));
if (userDataDirArg)
throw new Error('Pass userDataDir parameter instead of specifying --user-data-dir argument');