chore: allow to switch between browser connection methods (#815)

This commit is contained in:
Yury Semikhatsky
2025-08-01 17:34:28 -07:00
committed by GitHub
parent a60d7b8cd1
commit 372395666a
8 changed files with 87 additions and 14 deletions

View File

@@ -41,6 +41,7 @@ export class Context {
readonly tools: Tool[];
readonly config: FullConfig;
readonly sessionLog: SessionLog | undefined;
readonly options: ContextOptions;
private _browserContextPromise: Promise<{ browserContext: playwright.BrowserContext, close: () => Promise<void> }> | undefined;
private _browserContextFactory: BrowserContextFactory;
private _tabs: Tab[] = [];
@@ -56,6 +57,7 @@ export class Context {
this.tools = options.tools;
this.config = options.config;
this.sessionLog = options.sessionLog;
this.options = options;
this._browserContextFactory = options.browserContextFactory;
this._clientInfo = options.clientInfo;
testDebug('create context');