0

I need put name of used browser to the 'reportFilename' in nightwatch-html-reporter.

It means: when the test ends the name of file will be something like this: firefox_1559642651723

I checked the xml reporter that is builded in Nightwatch from the installation. The xml reporter shows name of browser in file automatically and i want something like this in nightwatch-html-reporter

Sorry for my english. If there is more info needed please tell me and i will try add more

var reporter = new HtmlReporter({
    openBrowser: false,
    themeName: 'default',
    reportsDirectory: __dirname + '/reports',
    reportFilename: "thereHaveToBeNameOfBrowserNameLikeFirefox_",
    uniqueFilename: true
});
module.exports = {
    reporter: reporter.fn

};

When i run the test like this:
nightwatch --test tests\folder\nameOfScript --e chrome

I expect that the browser name chrome will be added to the reportFilename
Karel Junek
  • 33
  • 10
  • Are you using environment variables to trigger tests on various browsers/environment? If yes, then same variable can be used in reportFileName. – neeraj jain Jun 14 '19 at 11:58
  • Hello thank you for respnse. enviroment varriable is --e that using nightwatch hovewer i still do not know how to e or env variable use in reportFilename when this variable is in another file – Karel Junek Jul 01 '19 at 07:53

0 Answers0