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

Automation 多浏览器的量角器测试在启动时失败,automation,protractor,Automation,Protractor,我正在尝试为chrome和firefox运行e2e测试,我无法加载带有以下配置的chrome浏览器,非常感谢您的评论,谢谢 var HtmlReporter = require('protractor-beautiful-reporter'); exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: [ **some spec** ], m

我正在尝试为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());
    }
};

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

或者确保您的网格服务器已启动并运行,并且selenium服务器也已启动并运行


启动selenium服务器的命令
webdriver manager start

您遇到了什么错误?你的节点注册到中心了吗?@AmitJain感谢headsup,是的,它被配置为管道,无论我如何尝试在本地运行,以下是我得到的错误
WebDriverError:invalid参数:无法终止已退出的进程
try
directConnect:true
而不是使用
seleniumAddress:http://localhost:4444/wd/hub
或确保您的服务器正在运行,这是用于
webdriver manager start
的命令,我还建议这可能是一个权限问题,因此,一旦您确保您的hub已启动并在您提供的url上运行,请尝试使用cmd的管理员权限运行配置文件,这就是选择chromedriver执行测试的地方C:\Users\UserName\AppData\Roaming\npm\node\u modules\dragrator\node\u modules\webdriver管理器\selenium@AmitJain谢谢!!使用direct connect true解决的问题