Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cherry-pick(#16898): fix: include headlessness as a launch argument to browser #16998

Merged
merged 1 commit into from Aug 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/playwright-test/src/index.ts
Expand Up @@ -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;
Expand All @@ -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
Expand Down