feat: gget active remote brwoser current url

This commit is contained in:
karishmas6
2024-06-01 11:20:45 +05:30
parent 000a047723
commit 9c32080d4b

View File

@@ -91,4 +91,16 @@ export const destroyRemoteBrowser = async (id: string) : Promise<boolean> => {
export const getActiveBrowserId = (): string | null=> {
return browserPool.getActiveBrowserId();
};
/**
* Returns the url string from a remote browser if exists in the browser pool.
* @param id instance id of the remote browser
* @returns {string | undefined}
* @category BrowserManagement-Controller
*/
export const getRemoteBrowserCurrentUrl = (id: string): string | undefined => {
return browserPool.getRemoteBrowser(id)?.getCurrentPage()?.url();
};
};