How to use the testcafe.embeddingUtils function in testcafe

To help you get started, we’ve selected a few testcafe 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 rquellh / testcafe-cucumber / features / support / errorHandling.js View on Github external
.catch(function(result) {
            const errAdapter = new testcafe.embeddingUtils.TestRunErrorFormattableAdapter(result, {
                testRunPhase: testController.testRun.phase,
                userAgent: testController.testRun.browserConnection.browserInfo.userAgent,
            });
            return testController.testRun.errs.push(errAdapter);
        });
};
github DevExpress / testcafe-live / lib / test-run-controller.js View on Github external
const EventEmitter = require('events');

const testcafe = require('testcafe');

const TestRun = testcafe.embeddingUtils.TestRun;

const liveTestRunStorage = Symbol('live-test-run-storage');

const testRunCtorFactory = function (callbacks, command) {
    const { created, started, done } = callbacks;
    const { registerStopHandler }    = command;

    return class DebugRun extends TestRun {
        constructor (test, browserConnection, screenshotCapturer, warningLog, opts) {
            super(test, browserConnection, screenshotCapturer, warningLog, opts);

            this[liveTestRunStorage] = { test, stopping: false, stop: false, isInRoleInitializing: false };

            created(this, test);

            this.injectable.scripts.push('/testcafe-live.js');