无法使用量角器Jasmine创建新服务InternetExplorerDriverService

时间:2018-12-11 13:15:29

标签: javascript protractor internet-explorer-11 end-to-end

我知道这可能是常见问题。但是我只是坚持了最近两天的问题。我想使用Internet Explorer浏览器使用量角器框架运行端到端测试。我遵循了此链接中的所有步骤 Protractor with IE on Windows 10 fails - error code 199

但是在尝试运行测试时,我再次收到此错误。如果有人可以给我很好的建议,我会很高兴。

错误消息

 Debugger attached.
[14:03:47] E/launcher - Unable to create new service: InternetExplorerDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'NB132', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: driver.version: unknown
[14:03:47] E/launcher - SessionNotCreatedError: Unable to create new service: InternetExplorerDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'NB132', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: driver.version: unknown
    at Object.checkLegacyResponse (---\node_modules\selenium-webdriver\lib\error.js:546:15)
    at parseHttpResponse (--\node_modules\selenium-webdriver\lib\http.js:509:13)
    at doSend.then.response (---\node_modules\selenium-webdriver\lib\http.js:441:30)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
From: Task: WebDriver.createSession()
    at Function.createSession (C:\Users\--\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
    at createDriver (C:\Users\--\node_modules\selenium-webdriver\index.js:170:33)
Waiting for the debugger to disconnect...
    at Builder.build (C:\Users\--\node_modules\selenium-webdriver\index.js:635:14)
    at Local.getNewDriver (C:\Users\---\node_modules\protractor\built\driverProviders\driverProvider.js:53:33)
    at Runner.createBrowser (C:\Users\--\node_modules\protractor\built\runner.js:195:43)
    at q.then.then (C:\Users\--\node_modules\protractor\built\runner.js:339:29)
    at _fulfilled (C:\Users\--\node_modules\q\q.js:834:54)
    at C:\Users\--\node_modules\q\q.js:863:30
    at Promise.promise.promiseDispatch (C:\Users\---node_modules\q\q.js:796:13)
    at C:\Users\--\node_modules\q\q.js:604:44
    at runSingle (C:\Users\---\node_modules\q\q.js:137:13)
    at flush (C:\Users\---\node_modules\q\q.js:125:13)
    at process.internalTickCallback (internal/process/next_tick.js:70:11)
[14:03:47] E/launcher - Process exited with error code 199

Process finished with exit code 199

和配置文件

    const JasmineConsoleReporter = require('jasmine-console-reporter');
const reporter = new JasmineConsoleReporter({
    colors: 1,           // (0|false)|(1|true)|2
    cleanStack: 1,       // (0|false)|(1|true)|2|3
    verbosity: 4,        // (0|false)|1|2|(3|true)|4|Object
    listStyle: 'indent', // "flat"|"indent"
    timeUnit: 'ms',      // "ms"|"ns"|"s"
    timeThreshold: { ok: 500, warn: 1000, ouch: 3000 }, // Object|Number
    activity: false,     // boolean or string ("dots"|"star"|"flip"|"bouncingBar"|...)
    emoji: true,
    beep: true
});

exports.config = {
    allScriptsTimeout: 110000000,
    specs: [
        './e2e/tests/**/0300*.e2e-spec.ts',
    ],
    multiCapabilities:[
        {
            'browserName': 'internet explorer',
        },
        ],

    directConnect: false,
    baseUrl: '--------'
    framework: 'jasmine',
    jasmineNodeOpts: {
        isVerbose: true,
        showColors: true,
        defaultTimeoutInterval: 50000000
    },
    useAllAngular2AppRoots: true,
    beforeLaunch: function() {

    },
    onPrepare: function() {

        require('ts-node').register({
            project: 'e2e/tsconfig.json'
        });

        jasmine.getEnv().addReporter(reporter);

        var AllureReporter = require('jasmine-allure-reporter');
        jasmine.getEnv().addReporter(new AllureReporter({
            resultsDir: 'allure-results'
        }));
        jasmine.getEnv().afterEach(function(done){
            browser.takeScreenshot().then(function (png) {
                allure.createAttachment('Screenshot', function () {
                    return new Buffer(png, 'base64')
                }, 'image/png')();
                done();
            })
        });

        jasmine.getEnv().addReporter(new Jasmine2HtmlReporter({
            savePath: './test/jasmine/'
        }));
    }
};

0 个答案:

没有答案