feat: get browser instance
This commit is contained in:
@@ -71,4 +71,14 @@ export class BrowserPool {
|
||||
logger.log('debug', `Remote browser with id: ${id} deleted from the pool`);
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user