How to use the testcafe-browser-tools.errors.UnableToAccessScreenRecordingAPIError function in testcafe-browser-tools

To help you get started, we’ve selected a few testcafe-browser-tools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DevExpress / testcafe / src / runner / bootstrapper.ts View on Github external
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;
    }