Tracing

Playwright\Tracing\TracingInterface

Methods

start()

void

Start tracing.

function start(array|StartOptions $options = []): void

startChunk()

void

Start a new trace chunk. If tracing was already started, this creates a new trace chunk.

function startChunk(array|StartChunkOptions $options = []): void

stop()

void

Stop tracing.

function stop(array|StopOptions $options = []): void

stopChunk()

void

Stop the trace chunk. See startChunk() for more details.

function stopChunk(array|StopChunkOptions $options = []): void

startHar()

void

Record network activity of this context to a HAR file, written only once stopHar() is called. A path ending in .zip stores response bodies as separate archive entries instead of inline.

function startHar(string $path, array|StartHarOptions $options = []): void

stopHar()

void

Stop HAR recording and write the file to the path given to startHar().

function stopHar(): void

group()

void
function group(string $name, ?string $location = null): void

groupEnd()

void
function groupEnd(): void