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 TraceV4

From Leeroopedia
Revision as of 11:38, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Microsoft_Playwright_TraceV4.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Implementation Page

Overview

TraceV4 defines the type schema for version 4 of the Playwright trace file format, extending V3 with additional serialized value types and language/size metadata.

Description

Version 4 extends the trace format with:

  • Language type -- tracks which SDK language generated the trace (javascript, python, java, csharp, jsonl)
  • Size type -- width/height dimensions for viewport and screenshot metadata
  • Extended SerializedValue -- adds support for BigInt (bi), Map (m), and Set (se) serialization
  • Enhanced event types with additional metadata fields

Usage

Used by the trace viewer for parsing V4 format trace files.

Code Reference

Source Location

packages/playwright-core/src/utils/isomorphic/trace/versions/traceV4.ts (225 lines)

Key Types

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

type SerializedValue = {
  // ... V3 fields plus:
  bi?: string;    // BigInt
  m?: SerializedValue;  // Map
  se?: SerializedValue; // Set
};

Import

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

I/O Contract

Changes from V3

  • Added Language and Size types
  • Extended SerializedValue with BigInt, Map, Set support
  • Enhanced event metadata

Related Pages

Page Connections

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