Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore(webkit): remove url from Connection (#199)
Yury Semikhatskyc9bc103a00ab
diff --git a/src/webkit/Connection.ts b/src/webkit/Connection.tsindex 7727c253a3..3d986ba686 100644--- a/src/webkit/Connection.ts+++ b/src/webkit/Connection.ts@@ -30,7 +30,6 @@ export const ConnectionEvents = {};export class Connection extends EventEmitter {- private _url: string;_lastId = 0;private _callbacks = new Map<number, {resolve:(o: any) => void, reject: (e: Error) => void, error: Error, method: string}>();private _delay: number;@@ -38,9 +37,8 @@ export class Connection extends EventEmitter {private _sessions = new Map<string, TargetSession>();_closed = false;- constructor(url: string, transport: ConnectionTransport, delay: number | undefined = 0) {+ constructor(transport: ConnectionTransport, delay: number | undefined = 0) {super();- this._url = url;this._delay = delay;this._transport = transport;@@ -52,10 +50,6 @@ export class Connection extends EventEmitter {return session._connection;}- url(): string {- return this._url;- }-send<T extends keyof Protocol.CommandParameters>(method: T,params?: Protocol.CommandParameters[T]diff --git a/src/webkit/Launcher.ts b/src/webkit/Launcher.tsindex e34c2a0717..e6965db9e7 100644--- a/src/webkit/Launcher.ts+++ b/src/webkit/Launcher.ts@@ -129,7 +129,7 @@ export class Launcher {let connection: Connection | null = null;try {const transport = new PipeTransport(webkitProcess.stdio[3] as NodeJS.WritableStream, webkitProcess.stdio[4] as NodeJS.ReadableStream);- connection = new Connection('', transport, slowMo);+ connection = new Connection(transport, slowMo);const browser = new Browser(connection, defaultViewport, webkitProcess, gracefullyCloseWebkit);await browser._waitForTarget(t => t._type === 'page');return browser;