diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index 0921fb1ad..8e68fc74d 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -2396,9 +2396,9 @@ class Playwright extends Helper { } if (this.options.recordVideo && this.page && this.page.video()) { - test.artifacts.video = await saveVideoForPage(this.page, `${test.title}.failed`) + test.artifacts.video = saveVideoForPage(this.page, `${test.title}.failed`) for (const sessionName in this.sessionPages) { - test.artifacts[`video_${sessionName}`] = await saveVideoForPage( + test.artifacts[`video_${sessionName}`] = saveVideoForPage( this.sessionPages[sessionName], `${test.title}_${sessionName}.failed`, ) @@ -2424,9 +2424,9 @@ class Playwright extends Helper { async _passed(test) { if (this.options.recordVideo && this.page && this.page.video()) { if (this.options.keepVideoForPassedTests) { - test.artifacts.video = await saveVideoForPage(this.page, `${test.title}.passed`) + test.artifacts.video = saveVideoForPage(this.page, `${test.title}.passed`) for (const sessionName of Object.keys(this.sessionPages)) { - test.artifacts[`video_${sessionName}`] = await saveVideoForPage( + test.artifacts[`video_${sessionName}`] = saveVideoForPage( this.sessionPages[sessionName], `${test.title}_${sessionName}.passed`, ) @@ -3917,7 +3917,7 @@ async function refreshContextSession() { } } -async function saveVideoForPage(page, name) { +function saveVideoForPage(page, name) { if (!page.video()) return null const fileName = `${`${global.output_dir}${pathSeparator}videos${pathSeparator}${uuidv4()}_${clearString(name)}`.slice(0, 245)}.webm` page @@ -3928,11 +3928,10 @@ async function saveVideoForPage(page, name) { page .video() .delete() - .catch((e) => {}) + .catch(() => {}) }) return fileName } - async function saveTraceForContext(context, name) { if (!context) return if (!context.tracing) return