feat: get browser

This commit is contained in:
amhsirak
2025-03-07 22:42:23 +05:30
parent 2fa75ab8f3
commit 63e48cead7

View File

@@ -149,5 +149,16 @@ export class BrowserPool {
return true;
};
/**
* Returns the remote browser instance from the pool.
*
* @param id remote browser instance's id
* @returns remote browser instance or undefined if it does not exist in the pool
*/
public getRemoteBrowser = (id: string): RemoteBrowser | undefined => {
logger.log('debug', `Remote browser with id: ${id} retrieved from the pool`);
return this.pool[id]?.browser;
};
}