i'm working in implementation of cucumber protractor have conf.js file:
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 command line report. }, cucumberopts: { require: 'features/steps/my_steps.js', } };
this step file contain console.log:
module.exports = function(){ this.given(/display something/, function () { console.log('hi'); }); }
and feature:
feature: running cucumber protractor scenario: protractor , cucumber test given display
but every time execute command
protractor conf.js
i'm getting error:
unhandled rejection verror: handler errored, process exiting: prettyformatter::handlefeaturesresult: path must string. received undefined
i'm not sure if have problems in conf.js or command not right execute.
i hope can me.
this works me:
in conf.js
in cucumberopts:
add this:
cucumberopts: { require: 'features/steps/my_steps.js', format: 'pretty', tags:'false' }
so me working hope solution guys.
Comments
Post a Comment