feat(browser): add support for authenticated remote CDP profiles

This commit is contained in:
Muhammed Mukhthar CM
2026-01-14 07:43:29 +00:00
committed by Peter Steinberger
parent d0cb4e092f
commit 6e0daf0936
4 changed files with 95 additions and 6 deletions

View File

@@ -256,6 +256,11 @@ function observeBrowser(browser: Browser) {
for (const context of browser.contexts()) observeContext(context);
}
export async function getConnectedBrowser(cdpUrl: string): Promise<Browser> {
const { browser } = await connectBrowser(cdpUrl);
return browser;
}
async function connectBrowser(cdpUrl: string): Promise<ConnectedBrowser> {
const normalized = normalizeCdpUrl(cdpUrl);
if (cached?.cdpUrl === normalized) return cached;