Skip to content

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

chore: don't show reused browser intro (#16289)

Pavel Feldman5d7e80bed6c4
diff --git a/packages/playwright-core/src/remote/playwrightServer.ts b/packages/playwright-core/src/remote/playwrightServer.ts
index 2155a0cdd7..4658c4589d 100644
--- a/packages/playwright-core/src/remote/playwrightServer.ts
+++ b/packages/playwright-core/src/remote/playwrightServer.ts
@@ -22,7 +22,6 @@ import type { Playwright } from '../server/playwright';
import { createPlaywright } from '../server/playwright';
import { PlaywrightConnection } from './playwrightConnection';
import { assert } from '../utils';
-import { serverSideCallMetadata } from '../server/instrumentation';
import type { LaunchOptions } from '../server/types';
import { ManualPromise } from '../utils/manualPromise';
@@ -64,34 +63,6 @@ export class PlaywrightServer {
}
async listen(port: number = 0): Promise<string> {
- if (this._mode === 'reuse-browser') {
- const callMetadata = serverSideCallMetadata();
- const browser = await this._preLaunchedPlaywright!.chromium.launch(callMetadata, { headless: false });
- const { context } = await browser.newContextForReuse({
- viewport: {
- width: 800,
- height: 600
- },
- locale: 'en-US',
- deviceScaleFactor: process.platform === 'darwin' ? 2 : 1
- }, callMetadata);
- const page = await context.newPage(callMetadata);
- await page.mainFrame().setContent(callMetadata, `
- <style>
- html, body {
- width: 100%;
- height: 100%;
- }
- body {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- </style>
- <div>Playwright will use this page to run tests</div>`);
- }
-
const server = http.createServer((request, response) => {
response.end('Running');
});