Muliple浏览器的量角器测试在启动时失败

问题描述 投票:0回答:1

我正在尝试对chrome和firefox运行e2e测试,并且无法使用以下配置加载chrome浏览器,非常感谢任何评论,谢谢

var HtmlReporter = require('protractor-beautiful-reporter');
exports.config = {
    seleniumAddress: 'http://localhost:4444/wd/hub',
            specs: [ **some spec**
            ],
    multiCapabilities: [{
        "browserName": "firefox"
    },
        {
            "browserName": "chrome",
    }
    ],
    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 180000
    },
    allScriptsTimeout: 200000,
    onPrepare: function () {
        browser.manage().timeouts().implicitlyWait(20000);
        jasmine.getEnv().addReporter(new HtmlReporter({
            baseDirectory: 'test-result',
            preserveDirectory: false,
            takeScreenShotsOnlyForFailedSpecs: true,
            screenshotsSubfolder: 'images'
        }).getJasmine2Reporter());
    }
};
automation protractor
1个回答
1
投票

尝试使用directConnect: true而不是使用seleniumAddress: http://localhost:4444/wd/hub

或确保您的网格服务器已启动并正在运行,并且硒服务器已启动并正在运行

启动硒服务器webdriver-manager start的命令

© www.soinside.com 2019 - 2024. All rights reserved.