Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private static async _checkRequiredPermissions (browserInfo: BrowserInfoSource[]): Promise {
const hasLocalBrowsers = await Bootstrapper._hasLocalBrowsers(browserInfo);
const { error } = await authenticationHelper(
() => findWindow(''),
errors.UnableToAccessScreenRecordingAPIError,
{
interactive: hasLocalBrowsers && !isCI
}
);
if (!error)
return;
if (hasLocalBrowsers)
throw error;
RemoteBrowserProvider.canDetectLocalBrowsers = false;
}