Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Microsoft Playwright TraceV8

From Leeroopedia

Template:Implementation Page

Overview

TraceV8 defines the type schema for version 8 (current) of the Playwright trace file format, representing the latest evolution of the trace data model.

Description

Version 8 is the current trace format version, maintaining the full feature set from V7 including:

  • Complete serialized value support (primitives, collections, TypedArrays, Errors, BigInt, Map, Set)
  • Language and SDK metadata
  • Rich event types for actions, navigation, console, network
  • HAR-based resource snapshots
  • Stack frame attribution
  • Binary buffer support

This is the format generated by the current version of Playwright and consumed by the trace viewer.

Usage

Used by the current Playwright version for writing and reading trace files.

Code Reference

Source Location

packages/playwright-core/src/utils/isomorphic/trace/versions/traceV8.ts (260 lines)

Key Types

type Language = 'javascript' | 'python' | 'java' | 'csharp' | 'jsonl';
type Point = { x: number; y: number };
type Size = { width: number; height: number };
type Binary = Buffer;

type SerializedValue = {
  n?: number; b?: boolean; s?: string;
  v?: 'null' | 'undefined' | 'NaN' | 'Infinity' | '-Infinity' | '-0';
  d?: string; u?: string; bi?: string;
  ta?: { b: Binary; k: string };
  e?: { m: string; n: string; s: string };
  r?: { p: string; f: string };
  a?: SerializedValue[];
  o?: { k: string; v: SerializedValue }[];
  h?: number; id?: number; ref?: number;
};

Import

import type * as traceV8 from '../utils/isomorphic/trace/versions/traceV8';

I/O Contract

Data Format

  • ZIP archives containing JSON-lines event files
  • HAR resource snapshots
  • Screenshot and video artifacts
  • Source code references and stack traces

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment