Screencast
Playwright\Screencast\ScreencastInterface
Records a video of a page and draws annotations over it. The overlay and action methods work whether or not a recording is running, so they can also be used to decorate a page on their own.
Methods
hideActions()
voidStops decorating actions and removes the decorations already on screen.
function hideActions(): void
hideOverlays()
voidStops rendering the overlays without discarding them, so showOverlays() can bring them back.
function hideOverlays(): void
showActions()
voidDecorates every later action with a cursor and a title, until hideActions() is called.
function showActions(array $options = []): void
showChapter()
voidShows a title card over a blurred backdrop, removed once its duration elapses.
function showChapter(string $title, array $options = []): void
showOverlay()
voidDraws HTML over the page; without a duration the overlay stays until hideOverlays().
function showOverlay(string $html, array $options = []): void
showOverlays()
voidRenders the overlays that hideOverlays() had suppressed.
function showOverlays(): void
start()
voidStarts recording; without a path the frames are captured but never written anywhere. Throws when a screencast is already running on the page.
function start(array $options = []): void
stop()
voidWrites the video to the path given to start(); does nothing when no screencast is running.
function stop(): void