1
우리는, 나는 다음과 같은 오류가 4.0 각도기로 업그레이드 이후 config
파일 -'전역'이 각도기 4.0.0에서 예상대로 작동하지 않습니까?
exports.config = {
directConnect: true,
baseUrl: env.baseUrl,
capabilities: env.capabilities,
onPrepare: function() {
var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
global.expect = chai.expect; // by removing this line error is not thrown
browser.manage().window().maximize();
},
setDefaultTimeout : 60 * 1000,
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
specs: [
'../Features/*.feature'
],
cucumberOpts: {
monochrome: true,
strict: true,
plugin: ["pretty"],
require: ['../StepDefinitions/*.js', '../Support/*.js'],
tags:'@AddActiveTip,@AddInActiveTip,[email protected],[email protected]'
//tags:'@TestSplitText'
}
};
우리의 onPrepare
기능에 다음과 같은 설정을 얻고있는 브라우저가 무기한 중단하고 오류가 어쨌든에서 디버깅하는 데 도움이되지 않습니다 .
오류 :는
> protractor Config/config.js --troubleshoot
[22:38:12] I/direct - Using FirefoxDriver directly...
[22:38:12] I/launcher - Running 1 instances of WebDriver
/Users/pasalar/protractor/psms-protractor/node_modules/protractor/built/exitCodes.js:87
if (e.message.indexOf(errMsg) !== -1) {
^
TypeError: Cannot read property 'indexOf' of undefined
at Function.ErrorHandler.isError (/Users/pasalar/protractor/psms-protractor/node_modules/protractor/built/exitCodes.js:87:30)
at Function.ErrorHandler.parseError (/Users/pasalar/protractor/psms-protractor/node_modules/protractor/built/exitCodes.js:98:26)
at process.<anonymous> (/Users/pasalar/protractor/psms-protractor/node_modules/protractor/built/launcher.js:169:54)
at emitOne (events.js:82:20)
at process.emit (events.js:169:7)
at process.emit (/Users/pasalar/protractor/psms-protractor/node_modules/protractor/node_modules/source-map-support/source-map-support.js:419:21)
at process._fatalException (node.js:224:26)
npm ERR! Test failed. See above for more details.
다른 사람이이 문제에 직면하고있다? 내가 놓친 중대한 변경 사항이 있습니까?
'프레임 워크'에 대해 설정 한 내용을 보여 주시겠습니까? – alecxe
@alex 너무 화려하지 않고, 설정 파일을 추가했습니다. 또한 나는 일부 로케이터가 빠졌음에도 불구하고 이것이 실패하지 않도록해야한다는 것을 알고있는 전역 네임 스페이스를 확인하고있다. 내가 체크해 볼게! –