크롬 (v54)의 최신 업데이트로 인해 우리의 각도기 테스트에 실패했습니다. 우리는 최신 버전의 gulp-protractor (v3.0.0)로 업데이트를 시도하여 문제를 해결하기 위해 최신 웹 드라이버 (v2.25)를 다운로드했지만 불행히도 새로운 오류가 발생하여 해결할 수 없었습니다.크롬 v54/웹 드라이버 v2.25의 꺽쇠 - 각도기 오류
크롬 업데이트 전에 모든 것이 잘 작동했습니다. 다음과 같이
우리의 각도기의 구성은 다음과 같습니다
exports.config = {
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
onPrepare: function() {
var fs = require('fs');
var testDir = 'testresults/';
if (!fs.existsSync(testDir)) {
fs.mkdirSync(testDir);
}
var jasmineReporters = require('jasmine-reporters');
// returning the promise makes protractor wait for the reporter config before executing tests
return browser.getProcessedConfig().then(function() {
// you could use other properties here if you want, such as platform and version
var browserName = 'browser';
browser.getCapabilities().then(function (caps) {
browserName = caps.caps_.browserName.replace(/ /g, "_");
var junitReporter = new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
savePath: testDir,
// this will produce distinct xml files for each capability
filePrefix: 'test-protractor-' + browserName,
modifySuiteName: function (generatedSuiteName) {
// this will produce distinct suite names for each capability,
// e.g. 'firefox.login tests' and 'chrome.login tests'
return 'test-protractor-' + browserName + '.' + generatedSuiteName;
}
});
jasmine.getEnv().addReporter(junitReporter);
});
});
},
baseUrl: 'http://localhost:3000',
// Spec patterns are relative to the current working directory when
// protractor is called.
specs: [paths.e2e + '/**/*.js'],
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
}
};
오류 :
[13:27:13] E/launcher - Error: Error
at C:\ws\node_modules\protractor\built\util.js:55:37
at _rejected (C:\ws\node_modules\q\q.js:844:24)
at C:\ws\node_modules\q\q.js:870:30
at Promise.when (C:\ws\node_modules\q\q.js:1122:31)
at Promise.promise.promiseDispatch (C:\ws\node_modules\q\q.js:788:41)
at C:\ws\node_modules\q\q.js:604:44
at runSingle (C:\ws\node_modules\q\q.js:137:13)
at flush (C:\ws\node_modules\q\q.js:125:13)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
[13:27:13] E/launcher - Process exited with error code 100
이 당신의 코드가 명확하게이 문제에 대한 관심이라고 상자 밖으로 내 문제가 해결되지 않았지만 : 기능 객체는 다음과 같이 액세스해야 caps_ '은 더 이상 가능하지 않게되었습니다. 어쨌든 어쨌든 사용하지 말았어야 했으므로 해결책은 다음과 같습니다. 브라우저 이름 = 기능 .get ('browserName'). 바꾸기 (//g, "_"); .com/angular/protractor/issues/3036)은 그 문제를 가진 다른 사람에게도 링크입니다. 도움을 주셔서 감사합니다. 나는 onPrepare 함수가 그런 불투명 한 에러를 일으킬 것이라고 생각하지 못했습니다. – PremiumTier
문제 없습니다. 'runFilenameOrFn_' 오류 메시지는 도움이되지 않습니다. 이것은 결국 개선 될 것입니다. – cnishina