feat(browser): add support for authenticated remote CDP profiles
This commit is contained in:
committed by
Peter Steinberger
parent
d0cb4e092f
commit
6e0daf0936
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user