# microsoft/playwright-examples architecture

> Architecture diagram of the GitHub repository microsoft/playwright-examples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/playwright-examples
- Repository: https://github.com/microsoft/playwright-examples

## Overview

This repository is a collection of Playwright testing examples, not an application runtime. The user-facing workflow is to run the example tests with Playwright; the configured runner discovers tests under `tests` and targets desktop Chromium, Firefox, and WebKit. The tree identifies API mocking, boxed-step, page-object-model, and clock examples, but their test bodies were not provided, so their internal calls and HAR usage are not asserted.

Main entry points: [`playwright.config.ts`](https://github.com/microsoft/playwright-examples/blob/main/playwright.config.ts) (Playwright config), [`tests/api-mocking`](https://github.com/microsoft/playwright-examples/tree/main/tests/api-mocking) (API mocking), [`tests/boxed-steps`](https://github.com/microsoft/playwright-examples/tree/main/tests/boxed-steps) (Boxed steps), [`tests/boxed-steps-pom`](https://github.com/microsoft/playwright-examples/tree/main/tests/boxed-steps-pom) (Boxed steps POM)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Test execution"]
  node_runner["Playwright runner"]
  node_config["Playwright config"]
end

subgraph group_examples["Testing examples"]
  node_api_mocking["API mocking"]
  node_boxed_steps["Boxed steps"]
  node_boxed_steps_pom["Boxed steps POM"]
  node_clock["Clock"]
  node_har_assets["HAR assets"]
end

node_user(("Test author"))

node_user -->|"runs examples"| node_runner
node_runner -.->|"uses settings"| node_config
node_config -->|"discovers tests"| node_api_mocking
node_config -->|"discovers tests"| node_boxed_steps
node_config -->|"discovers tests"| node_boxed_steps_pom
node_config -->|"discovers tests"| node_clock

click node_config "https://github.com/microsoft/playwright-examples/blob/main/playwright.config.ts"
click node_api_mocking "https://github.com/microsoft/playwright-examples/tree/main/tests/api-mocking"
click node_boxed_steps "https://github.com/microsoft/playwright-examples/tree/main/tests/boxed-steps"
click node_boxed_steps_pom "https://github.com/microsoft/playwright-examples/tree/main/tests/boxed-steps-pom"
click node_clock "https://github.com/microsoft/playwright-examples/tree/main/tests/clock"
click node_har_assets "https://github.com/microsoft/playwright-examples/tree/main/hars"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner,node_config toneBlue
class node_api_mocking,node_boxed_steps,node_boxed_steps_pom,node_clock,node_har_assets toneAmber
class node_user toneIndigo
```

## Components

### Test execution

- **Playwright runner**
- [Playwright config](https://github.com/microsoft/playwright-examples/blob/main/playwright.config.ts): `playwright.config.ts`

### Testing examples

- [API mocking](https://github.com/microsoft/playwright-examples/tree/main/tests/api-mocking): `tests/api-mocking`
- [Boxed steps](https://github.com/microsoft/playwright-examples/tree/main/tests/boxed-steps): `tests/boxed-steps`
- [Boxed steps POM](https://github.com/microsoft/playwright-examples/tree/main/tests/boxed-steps-pom): `tests/boxed-steps-pom`
- [Clock](https://github.com/microsoft/playwright-examples/tree/main/tests/clock): `tests/clock`
- [HAR assets](https://github.com/microsoft/playwright-examples/tree/main/hars): `hars`

### Other components

- **Test author**

## Connections

- Test author → Playwright runner: runs examples (evidence: `README.md`)
- Playwright runner → Playwright config: uses settings
- Playwright config → API mocking: discovers tests (evidence: `playwright.config.ts`)
- Playwright config → Boxed steps: discovers tests (evidence: `playwright.config.ts`)
- Playwright config → Boxed steps POM: discovers tests (evidence: `playwright.config.ts`)
- Playwright config → Clock: discovers tests (evidence: `playwright.config.ts`)
