fix(chromium): workaround enable-automation infobar (#10869)

This commit is contained in:
Dmitry Gozman 2021-12-13 10:35:39 -08:00 committed by GitHub
parent 6adf94a8cd
commit 9f2a040241
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -91,6 +91,7 @@ export class RecorderApp extends EventEmitter {
'--app=data:text/html,',
'--window-size=600,600',
'--window-position=1280,10',
'--test-type=',
];
if (process.env.PWTEST_RECORDER_PORT)
args.push(`--remote-debugging-port=${process.env.PWTEST_RECORDER_PORT}`);
@ -98,6 +99,7 @@ export class RecorderApp extends EventEmitter {
channel: findChromiumChannel(sdkLanguage),
args,
noDefaultViewport: true,
ignoreDefaultArgs: ['--enable-automation'],
headless: !!process.env.PWTEST_CLI_HEADLESS || (isUnderTest() && !headed),
useWebSocket: !!process.env.PWTEST_RECORDER_PORT
});

View file

@ -52,7 +52,8 @@ export async function showTraceViewer(traceUrl: string, browserName: string, hea
const traceViewerBrowser = isUnderTest() ? 'chromium' : browserName;
const args = traceViewerBrowser === 'chromium' ? [
'--app=data:text/html,',
'--window-size=1280,800'
'--window-size=1280,800',
'--test-type=',
] : [];
if (isUnderTest())
args.push(`--remote-debugging-port=0`);
@ -62,6 +63,7 @@ export async function showTraceViewer(traceUrl: string, browserName: string, hea
channel: findChromiumChannel(traceViewerPlaywright.options.sdkLanguage),
args,
noDefaultViewport: true,
ignoreDefaultArgs: ['--enable-automation'],
headless,
useWebSocket: isUnderTest()
});