MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / saveVideoForPage

Function saveVideoForPage

lib/helper/Playwright.js:4821–4835  ·  view source on GitHub ↗
(page, name)

Source from the content-addressed store, hash-verified

4819}
4820
4821function saveVideoForPage(page, name) {
4822 if (!page.video()) return null
4823 const fileName = `${`${store.outputDir}${pathSeparator}videos${pathSeparator}${uuidv4()}_${clearString(name)}`.slice(0, 245)}.webm`
4824 page
4825 .video()
4826 .saveAs(fileName)
4827 .then(() => {
4828 if (!page) return
4829 page
4830 .video()
4831 .delete()
4832 .catch(() => {})
4833 })
4834 return fileName
4835}
4836async function saveTraceForContext(context, name) {
4837 if (!context) return
4838 if (!context.tracing) return

Callers 2

_failedMethod · 0.85
_passedMethod · 0.85

Calls 2

clearStringFunction · 0.90
deleteMethod · 0.80

Tested by

no test coverage detected