# nikita-filonov/playwright_python architecture

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

- Interactive diagram: https://gitdiagram.com/nikita-filonov/playwright_python
- Repository: https://github.com/nikita-filonov/playwright_python

## Overview

This repository provides Playwright page objects and reusable UI components for automating the Playwright documentation site. The intended workflow is page navigation and interaction, including opening search, entering a query, and selecting a result; a language page also supports checking language headings. The excerpts show these page-object and component relationships, but not the tests’ wiring or their starting page. The report-related files under docs are not mapped as runtime behavior.

Main entry points: [`page_factory/component.py`](https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/component.py) (Component base), [`components/navigation/navbar.py`](https://github.com/nikita-filonov/playwright_python/blob/main/components/navigation/navbar.py) (Navigation bar), [`components/modals/search_modal.py`](https://github.com/nikita-filonov/playwright_python/blob/main/components/modals/search_modal.py) (Search modal), [`pages/base_page.py`](https://github.com/nikita-filonov/playwright_python/blob/main/pages/base_page.py) (Base page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Page Objects"]
  node_home["Home page"]
  node_languages["Languages page"]
  node_base["Base page<br/>[base_page.py]"]
end

subgraph group_navigation["Site Navigation"]
  node_navbar["Navigation bar<br/>[navbar.py]"]
  node_search["Search modal<br/>[search_modal.py]"]
end

subgraph group_factory["UI Components"]
  node_component["Component base<br/>[component.py]"]
  node_button["Button<br/>[button.py]"]
  node_input["Input<br/>[input.py]"]
  node_link["Link<br/>[link.py]"]
  node_listitem["List item<br/>[list_item.py]"]
  node_title["Title<br/>[title.py]"]
end

node_automation(("Automation caller"))
node_playwright["Playwright API"]
node_allure["Allure reporting"]

node_home -->|"extends"| node_base
node_languages -->|"extends"| node_base
node_languages -->|"uses"| node_title
node_base -->|"constructs"| node_navbar
node_base -->|"navigates via"| node_playwright
node_navbar -->|"constructs"| node_search
node_navbar -->|"uses"| node_button
node_navbar -->|"uses"| node_link
node_navbar -->|"opens and checks"| node_search
node_search -->|"fills and checks"| node_input
node_search -->|"selects result"| node_listitem
node_search -->|"checks visibility"| node_title
node_button -->|"extends"| node_component
node_input -->|"extends"| node_component
node_link -->|"extends"| node_component
node_listitem -->|"extends"| node_component
node_title -->|"extends"| node_component
node_component -->|"locates and checks"| node_playwright
node_component -->|"records steps"| node_allure

click node_home "https://github.com/nikita-filonov/playwright_python/blob/main/pages/playwright_home_page.py"
click node_languages "https://github.com/nikita-filonov/playwright_python/blob/main/pages/playwright_languages_page.py"
click node_base "https://github.com/nikita-filonov/playwright_python/blob/main/pages/base_page.py"
click node_navbar "https://github.com/nikita-filonov/playwright_python/blob/main/components/navigation/navbar.py"
click node_search "https://github.com/nikita-filonov/playwright_python/blob/main/components/modals/search_modal.py"
click node_component "https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/component.py"
click node_button "https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/button.py"
click node_input "https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/input.py"
click node_link "https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/link.py"
click node_listitem "https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/list_item.py"
click node_title "https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/title.py"

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_home,node_languages,node_base toneBlue
class node_navbar,node_search toneAmber
class node_component,node_button,node_input,node_link,node_listitem,node_title,node_playwright toneMint
class node_automation,node_allure toneIndigo
```

## Components

### Page Objects

- [Home page](https://github.com/nikita-filonov/playwright_python/blob/main/pages/playwright_home_page.py): `pages/playwright_home_page.py`
- [Languages page](https://github.com/nikita-filonov/playwright_python/blob/main/pages/playwright_languages_page.py): `pages/playwright_languages_page.py`
- [Base page](https://github.com/nikita-filonov/playwright_python/blob/main/pages/base_page.py): `pages/base_page.py`

### Site Navigation

- [Navigation bar](https://github.com/nikita-filonov/playwright_python/blob/main/components/navigation/navbar.py): `components/navigation/navbar.py`
- [Search modal](https://github.com/nikita-filonov/playwright_python/blob/main/components/modals/search_modal.py): `components/modals/search_modal.py`

### UI Components

- [Component base](https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/component.py): `page_factory/component.py`
- [Button](https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/button.py): `page_factory/button.py`
- [Input](https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/input.py): `page_factory/input.py`
- [Link](https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/link.py): `page_factory/link.py`
- [List item](https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/list_item.py): `page_factory/list_item.py`
- [Title](https://github.com/nikita-filonov/playwright_python/blob/main/page_factory/title.py): `page_factory/title.py`

### Other components

- **Automation caller**
- **Playwright API**
- **Allure reporting**

## Connections

- Home page → Base page: extends (evidence: `pages/playwright_home_page.py`)
- Languages page → Base page: extends (evidence: `pages/playwright_languages_page.py`)
- Languages page → Title: uses (evidence: `pages/playwright_languages_page.py`)
- Base page → Navigation bar: constructs (evidence: `pages/base_page.py`)
- Base page → Playwright API: navigates via (evidence: `pages/base_page.py`)
- Navigation bar → Search modal: constructs (evidence: `components/navigation/navbar.py`)
- Navigation bar → Button: uses (evidence: `components/navigation/navbar.py`)
- Navigation bar → Link: uses (evidence: `components/navigation/navbar.py`)
- Navigation bar → Search modal: opens and checks (evidence: `components/navigation/navbar.py`)
- Search modal → Input: fills and checks (evidence: `components/modals/search_modal.py`)
- Search modal → List item: selects result (evidence: `components/modals/search_modal.py`)
- Search modal → Title: checks visibility (evidence: `components/modals/search_modal.py`)
- Button → Component base: extends (evidence: `page_factory/button.py`)
- Input → Component base: extends (evidence: `page_factory/input.py`)
- Link → Component base: extends (evidence: `page_factory/link.py`)
- List item → Component base: extends (evidence: `page_factory/list_item.py`)
- Title → Component base: extends (evidence: `page_factory/title.py`)
- Component base → Playwright API: locates and checks (evidence: `page_factory/component.py`)
- Component base → Allure reporting: records steps (evidence: `page_factory/component.py`)
