Skip to content

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

chore: remove unused PW_TEST_OUT_OF_PROCESS_DRIVER (#19434)

Dmitry Gozmanab9602bebf81
diff --git a/packages/playwright-test/src/index.ts b/packages/playwright-test/src/index.ts
index 5efdcb7ac5..c82c341bc4 100644
--- a/packages/playwright-test/src/index.ts
+++ b/packages/playwright-test/src/index.ts
@@ -18,7 +18,6 @@ import * as fs from 'fs';
import * as path from 'path';
import type { APIRequestContext, BrowserContext, BrowserContextOptions, LaunchOptions, Page, Tracing, Video } from 'playwright-core';
import * as playwrightLibrary from 'playwright-core';
-import * as outOfProcess from 'playwright-core/lib/outofprocess';
import { createGuid, debugMode } from 'playwright-core/lib/utils';
import { removeFolders } from 'playwright-core/lib/utils/fileUtils';
import type { Fixtures, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, TestInfo, TestType, TraceMode, VideoMode } from '../types/test';
@@ -58,18 +57,8 @@ type WorkerFixtures = PlaywrightWorkerArgs & PlaywrightWorkerOptions & {
const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
defaultBrowserType: ['chromium', { scope: 'worker', option: true }],
browserName: [({ defaultBrowserType }, use) => use(defaultBrowserType), { scope: 'worker', option: true }],
- playwright: [async ({ }, use) => {
- if (process.env.PW_OUT_OF_PROCESS_DRIVER) {
- const impl = await outOfProcess.start({
- NODE_OPTIONS: undefined // Hide driver process while debugging.
- });
- const pw = impl.playwright as any;
- pw._setSelectors(playwrightLibrary.selectors);
- await use(pw);
- await impl.stop();
- } else {
- await use(require('playwright-core'));
- }
+ playwright: [async ({}, use) => {
+ await use(require('playwright-core'));
}, { scope: 'worker' }],
headless: [({ launchOptions }, use) => use(launchOptions.headless ?? true), { scope: 'worker', option: true }],
channel: [({ launchOptions }, use) => use(launchOptions.channel), { scope: 'worker', option: true }],
diff --git a/tests/library/playwright.config.ts b/tests/library/playwright.config.ts
index bb46802f5c..a05870d7e7 100644
--- a/tests/library/playwright.config.ts
+++ b/tests/library/playwright.config.ts
@@ -35,9 +35,7 @@ const getExecutablePath = (browserName: BrowserName) => {
};
let mode: TestModeName = 'default';
-if (process.env.PW_OUT_OF_PROCESS_DRIVER)
- mode = 'driver';
-else if (process.env.PLAYWRIGHT_DOCKER)
+if (process.env.PLAYWRIGHT_DOCKER)
mode = 'docker';
else
mode = (process.env.PWTEST_MODE ?? 'default') as ('default' | 'driver' | 'service' | 'service2');
diff --git a/tests/playwright-test/playwright-test-fixtures.ts b/tests/playwright-test/playwright-test-fixtures.ts
index e45c258c7e..31b06ddd20 100644
--- a/tests/playwright-test/playwright-test-fixtures.ts
+++ b/tests/playwright-test/playwright-test-fixtures.ts
@@ -211,7 +211,6 @@ async function runPlaywrightCommand(childProcess: CommonFixtures['childProcess']
PW_TEST_REPORTER_WS_ENDPOINT: undefined,
PW_TEST_SOURCE_TRANSFORM: undefined,
PW_TEST_SOURCE_TRANSFORM_SCOPE: undefined,
- PW_OUT_OF_PROCESS_DRIVER: undefined,
NODE_OPTIONS: undefined,
...env,
},