mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix: include headlessness as a launch argument to browser (#16898)
This commit is contained in:
parent
e8b9d4e758
commit
38f2a5d5f5
@ -106,7 +106,7 @@ export const test = _baseTest.extend<TestFixtures, WorkerFixtures>({
|
||||
(browserType as any)._defaultLaunchOptions = undefined;
|
||||
}, { scope: 'worker', auto: true }],
|
||||
|
||||
_connectedBrowser: [async ({ playwright, browserName, channel, headless, connectOptions, launchOptions }, use) => {
|
||||
_connectedBrowser: [async ({ playwright, browserName, connectOptions, _browserOptions }, use) => {
|
||||
if (!connectOptions) {
|
||||
await use(undefined);
|
||||
return;
|
||||
@ -116,7 +116,7 @@ export const test = _baseTest.extend<TestFixtures, WorkerFixtures>({
|
||||
const browser = await playwright[browserName].connect(connectOptions.wsEndpoint, {
|
||||
headers: {
|
||||
'x-playwright-browser': browserName,
|
||||
'x-playwright-launch-options': JSON.stringify(launchOptions),
|
||||
'x-playwright-launch-options': JSON.stringify(_browserOptions),
|
||||
...connectOptions.headers,
|
||||
},
|
||||
timeout: connectOptions.timeout ?? 3 * 60 * 1000, // 3 minutes
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user