javascript - Multiple functions with onPrepare in Protractor -
i have conf.js
file in protractor test suite.
there single onprepare
entry @ first wish add second.
i'm struggling syntax right follows onprepare
error free.
original entry:
onprepare: function() { jasmine.getenv().addreporter(reporter); },
and second entry is:
const protractorimagecomparison = require('protractor-image-comparison'); browser. protractorimagecomparison = new protractorimagecomparison( { baselinefolder: 'path/to/baseline/', screenshotpath: 'path/to/save/actual/screenshots/' } ); }, }
do need add second function()
above const
?
have try below?
tip: onprepare 1 place in protractor conf file can use variable: browser, because when run function browser variable initialize complete.
onprepare: function() { jasmine.getenv().addreporter(reporter); const protractorimagecomparison = require('protractor-image-comparison'); browser.protractorimagecomparison = new protractorimagecomparison( { baselinefolder: 'path/to/baseline/', screenshotpath: 'path/to/save/actual/screenshots/' } ); },
Comments
Post a Comment