Video

Playwright\Video\VideoInterface

Represents a recorded page video. A video becomes available when its owning page or context finishes recording. Save or delete its local file after the browser has completed the recording.

Methods

delete()

void

Deletes the recording file. Waits for the browser to finish writing the video when necessary. The video cannot be saved from this object after deletion.

function delete(): void

path()

string

Returns the recording path. The path identifies the local file assigned to this video. The file may not exist until the browser finishes recording.

function path(): string

saveAs()

void

Saves the recording to a path. Waits for the browser to finish writing the source video when necessary. Creates the target directory when the implementation can do so.

function saveAs(string $path): void