Skip to content

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

fix(wire): fix the wire mode (#4008)

Pavel Feldman6dccd2735ae5
diff --git a/src/driver.ts b/src/driver.ts
index cadf180761..cd8e7b2a22 100644
--- a/src/driver.ts
+++ b/src/driver.ts
@@ -63,3 +63,6 @@ export function runServer() {
(playwright as any).electron = new Electron();
new PlaywrightDispatcher(dispatcherConnection.rootDispatcher(), playwright);
}
+
+if (process.argv[2] === 'serve')
+ runServer();
diff --git a/test/fixtures.ts b/test/fixtures.ts
index 6cf6b1028f..369cabe070 100644
--- a/test/fixtures.ts
+++ b/test/fixtures.ts
@@ -92,7 +92,7 @@ fixtures.overrideWorkerFixture('playwright', async ({ browserName, testWorkerInd
if (wire) {
require('../lib/utils/utils').setUnderTest();
const connection = new Connection();
- const spawnedProcess = childProcess.fork(path.join(__dirname, '..', 'lib', 'server.js'), [], {
+ const spawnedProcess = childProcess.fork(path.join(__dirname, '..', 'lib', 'driver.js'), ['serve'], {
stdio: 'pipe',
detached: true,
});