How to use the testcafe-browser-tools.getBrowserInfo 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 / browser / provider / built-in / locally-installed.js View on Github external
async openBrowser (browserId, pageUrl, browserName) {
        const args  = browserName.split(' ');
        const alias = args.shift();

        const browserInfo    = await browserTools.getBrowserInfo(alias);
        const openParameters = Object.assign({}, browserInfo);

        if (args.length)
            openParameters.cmd = args.join(' ') + (openParameters.cmd ? ' ' + openParameters.cmd : '');

        await browserTools.open(openParameters, pageUrl);
    },
github DevExpress / testcafe / src / browser / provider / built-in / chrome / local-chrome.js View on Github external
export async function start (pageUrl, { browserName, config, cdpPort, tempProfileDir, inDocker }) {
    const chromeInfo           = await browserTools.getBrowserInfo(config.path || browserName);
    const chromeOpenParameters = Object.assign({}, chromeInfo);

    chromeOpenParameters.cmd = buildChromeArgs({ config, cdpPort, platformArgs: chromeOpenParameters.cmd, tempProfileDir, inDocker });

    await browserStarter.startBrowser(chromeOpenParameters, pageUrl);
}
github DevExpress / testcafe / src / browser / provider / built-in / path.js View on Github external
async _handleString (str) {
        const args = splitQuotedText(str, ' ', '`"\'');
        const path = args.shift();

        const browserInfo = await browserTools.getBrowserInfo(path);

        if (!browserInfo)
            return null;

        const params = Object.assign({}, browserInfo);

        if (args.length)
            params.cmd = args.join(' ') + (params.cmd ? ' ' + params.cmd : '');

        return params;
    },
github DevExpress / testcafe / src / browser / provider / built-in / dedicated / chrome / local-chrome.js View on Github external
export async function start (pageUrl, { browserName, config, cdpPort, tempProfileDir, inDocker }) {
    const chromeInfo           = await browserTools.getBrowserInfo(config.path || browserName);
    const chromeOpenParameters = Object.assign({}, chromeInfo);

    chromeOpenParameters.cmd = buildChromeArgs({ config, cdpPort, platformArgs: chromeOpenParameters.cmd, tempProfileDir, inDocker });

    await browserStarter.startBrowser(chromeOpenParameters, pageUrl);
}
github DevExpress / testcafe / src / browser / provider / built-in / dedicated / firefox / local-firefox.js View on Github external
export async function start (pageUrl, runtimeInfo) {
    const { browserName, config } = runtimeInfo;

    const firefoxInfo           = await browserTools.getBrowserInfo(config.path || browserName);
    const firefoxOpenParameters = Object.assign({}, firefoxInfo);

    if (OS.mac && !config.userProfile)
        correctOpenParametersForMac(firefoxOpenParameters);

    firefoxOpenParameters.cmd = buildFirefoxArgs(config, firefoxOpenParameters.cmd, runtimeInfo, runtimeInfo.newInstance);

    await browserStarter.startBrowser(firefoxOpenParameters, pageUrl);
}
github DevExpress / testcafe / src / browser / provider / built-in / dedicated / base.js View on Github external
async isValidBrowserName (browserName) {
        const config      = await this._getConfig(browserName);
        const browserInfo = await getBrowserInfo(config.path || this._getBrowserName());

        return !!browserInfo;
    },
github DevExpress / testcafe / src / browser / provider / built-in / path.js View on Github external
async _handleJSON (str) {
        let params = null;

        try {
            params = JSON.parse(str);
        }
        catch (e) {
            return null;
        }

        if (!params.path)
            return null;

        const openParameters = await browserTools.getBrowserInfo(params.path);

        if (!openParameters)
            return null;

        if (params.cmd)
            openParameters.cmd = params.cmd;

        return openParameters;
    },