量角器測試運行良好,直到我搞亂我的config.js
文件以包含屏幕截圖測試。量角器屏幕截圖測試錯誤代碼105
從運行量角器錯誤conf.js
C:\用戶\ HHHHHH \ MMMM \測試\ E2E>量角器conf.js
[10時50分十三秒] E/configParser - 錯誤代碼:105
[十點50分13秒] E/configParser - 描述:未能加載配置文件conf.js
C:\用戶\ HHHHHH \應用程序數據\漫遊\ NPM \ node_modules \拖長或\建造\ configParser.js:130 拋出新exitCodes_1.ConfigError(記錄器, '無法加載配置文件' +文件名);`
的package.json
{
"name": "e2e",
"version": "1.0.0",
"description": "yup yup yup",
"main": "conf.js",
"dependencies": {
"protractor-jasmine2-screenshot-reporter": "^0.3.1",
"protractor": "3.3.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
的conf。 JS
var ScreenShotReporter = require('protractor-screenshot-reporter');
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
framework: 'jasmine2',
specs: ['specs/*spec.js'],
onPrepare: function() {
jasmine.getEnv().addReporter(new ScreenShotReporter({
baseDirectory: 'target/screenshots'
}));
}
};
許多似乎是有這個問題。任何人都找到了解決方案?
你能粘貼你的配置文件嗎? –
@ igniteram1'conf.js' added –
你在哪裏定義了''''saveScreenshot'''? –