I would like my protractor-screenshoter-plugin to create report directory with spec name as directory name. Spec name is to be passed as parameter when running Protractor:
protractor --specs my_spec.js conf.js
After calling the above command I would like my test to be run and report to be created in directory my_spec.js (or my_spec).
Plugin's configuration is included in conf.js:
plugins: [{
package: 'protractor-screenshoter-plugin',
screenshotOnExpect: 'failure+success',
screenshotOnSpec: 'failure',
withLogs: false,
htmlReport: true,
screenshotPath: '',//I would like to put the --specs parameter value here
writeReportFreq: 'end',
clearFoldersBeforeTest: true
}]
Any ideas how to do it? How to access Protractor's '--specs' parameter value in conf.js?