context

Context

A WWW::Playwright::Context is an isolated browser session. Get one from Browser.new-context.

new-page(--> Page)

Opens a new page in the context and returns a Page.

my $page = $context.new-page;

start-tracing(--> Nil)

Starts recording a trace (screenshots and DOM snapshots) for the context.

$context.start-tracing;

stop-tracing(Str :$path --> Nil)

Stops tracing. With :path, writes the trace zip to that path.

$context.stop-tracing(path => '/tmp/trace.zip');

See Diagnostics for the full tracing workflow.

close(--> Nil)

Closes the context and its pages.

$context.close;

WWW::Playwright v0.9.1

A Raku driver for Playwright via a long-lived Node sidecar

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.