Below is my onprepare & reporters. When I access result_path in reporters I got value as undefined.
onPrepare: function (config, capabilities) {
today = new Date()
date = today.getDate()
time = date + "_" + today.getHours() + "hrs_" + today.getMinutes() + "mins_" + today.getSeconds() + "secs"
result_path = './execution_time_'+ time
if (!fs.existsSync(result_path)) {
fs.mkdirSync(result_path);
}
},
reporters: [['timeline', {
outputDir: result_path+'/',
fileName: 'timeliner-reporter.html',
embedImages: true,
images: {
quality: 80,
resize: false,
reductionRation: 2
},
screenshotStrategy:'before:click'
}]],