feat: show warning on ff & wk if devtools was given (#1463)
Show just a warning instead of preventing the launch on Firefox and WebKit to minimize the error rate / entry barrier. Not fully sure if `console.warn` is okay for that. Closes #1440
This commit is contained in:
parent
a2ee7a1f2a
commit
4b1fa2f2f9
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue