0
我與量角器黃瓜的執行工作我已經有conf.js文件後:「路徑必須是一個字符串」錯誤執行黃瓜功能
exports.config = {
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
capabilities: {
'browserName': 'firefox'
},
specs: './features/login.feature',
onPrepare: function(){
browser.driver.manage().window().maximize()
browser.get('http:www.google.com')
},
jasmineNodeOpts: {
showColors: true, // Use colors in the command line report.
},
cucumberOpts: {
require: 'features/steps/my_steps.js',
}
};
這是我的步文件,只是含有的console.log:
module.exports = function(){
this.Given(/Display something/, function() {
console.log('Hi');
});
}
,這是功能:
Feature: Running Cucumber with Protractor
Scenario: Protractor and Cucumber Test
Given Display something
,但每次我execu時間用命令
protractor conf.js
我得到這個錯誤蒂
Unhandled rejection VError: a handler errored, process exiting: PrettyFormatter::handleFeaturesResult: Path must be a string. Received undefined
我不知道如果我在conf.js問題或指令不執行的權利。
我希望你能幫助我。