We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5407e5 commit 0c8ec82Copy full SHA for 0c8ec82
lib/helper/Puppeteer.js
@@ -659,10 +659,11 @@ class Puppeteer extends Helper {
659
this.isAuthenticated = true;
660
}
661
662
- const fileName = `${`${global.output_dir}${path.sep}trace${path.sep}${uuidv4()}_${clearString(this.currentRunningTest.title)}`.slice(0, 245)}.json`;
663
- const dir = path.dirname(fileName);
664
- if (!fileExists(dir)) fs.mkdirSync(dir);
+
665
if (this.options.trace) {
+ const fileName = `${`${global.output_dir}${path.sep}trace${path.sep}${uuidv4()}_${clearString(this.currentRunningTest.title)}`.slice(0, 245)}.json`;
+ const dir = path.dirname(fileName);
666
+ if (!fileExists(dir)) fs.mkdirSync(dir);
667
await this.page.tracing.start({ screenshots: true, path: fileName });
668
this.currentRunningTest.artifacts.trace = fileName;
669
0 commit comments