# 0mprakashop/playwright_pytest architecture

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

- Interactive diagram: https://gitdiagram.com/0mprakashop/playwright_pytest
- Repository: https://github.com/0mprakashop/playwright_pytest

## Overview

This repository is a Python Playwright/PyTest web-automation framework. Its visible UI flow navigates through login, dashboard, and order verification page objects; a separate API helper authenticates and creates an order. The README also describes BDD, UI/API and network testing, fixtures, parameterization, and cross-browser runs. Those test modules were not sampled, so their internal calls and relationships are not inferred here.

Main entry points: [`playwright_base/pageObjects/login.py`](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/pageObjects/login.py) (User login), [`playwright_base/utils/API_testing.py`](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/utils/API_testing.py) (API order creation), [`playwright_base/pageObjects/Dashboard.py`](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/pageObjects/Dashboard.py) (User dashboard), [`playwright_base/conftest.py`](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/conftest.py) (Browser fixture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser Setup"]
  node_fixture["Browser fixture<br/>[conftest.py]"]
end

subgraph group_ui["UI Page Objects"]
  node_login["User login<br/>[login.py]"]
  node_dashboard["User dashboard<br/>[Dashboard.py]"]
  node_orders["Order verification<br/>[UserOrders.py]"]
end

subgraph group_api["API Operations"]
  node_api_auth["API authentication<br/>[API_testing.py]"]
  node_api_order["API order creation<br/>[API_testing.py]"]
end

subgraph group_scenarios["Automation Scenarios"]
  node_bdd_flow["BDD scenario"]
  node_ui_api_tests["UI/API tests<br/>[test_UI_API.py]"]
  node_network_tests["Network tests<br/>[test_network.py]"]
  node_playwright_tests["Playwright tests<br/>[test_playwright.py]"]
  node_bdd_tests["BDD tests<br/>[test_bdd.py]"]
  node_pytest_cases["PyTest cases<br/>[test_01.py]"]
  node_pytest_cases_2["PyTest cases<br/>[test_02.py]"]
end

node_pytest(("PyTest runner"))
node_browser_engine["Browser engine"]
node_client_app["Web client"]
node_api_service["External API"]

node_fixture -->|"launches"| node_browser_engine
node_login -->|"navigates"| node_client_app
node_login -->|"creates"| node_dashboard
node_dashboard -->|"creates"| node_orders
node_api_order -->|"gets token"| node_api_auth
node_api_auth -->|"posts login"| node_api_service
node_api_order -->|"posts order"| node_api_service

click node_fixture "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/conftest.py"
click node_login "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/pageObjects/login.py"
click node_dashboard "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/pageObjects/Dashboard.py"
click node_orders "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/pageObjects/UserOrders.py"
click node_api_auth "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/utils/API_testing.py"
click node_api_order "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/utils/API_testing.py"
click node_bdd_flow "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/features/orderTransaction.feature"
click node_ui_api_tests "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/test_UI_API.py"
click node_network_tests "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/test_network.py"
click node_playwright_tests "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/test_playwright.py"
click node_bdd_tests "https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/test_bdd.py"
click node_pytest_cases "https://github.com/0mprakashop/playwright_pytest/blob/main/pytest/test_01.py"
click node_pytest_cases_2 "https://github.com/0mprakashop/playwright_pytest/blob/main/pytest/test_02.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_fixture,node_browser_engine,node_client_app toneBlue
class node_login,node_dashboard,node_orders toneAmber
class node_api_auth,node_api_order,node_api_service toneMint
class node_bdd_flow,node_ui_api_tests,node_network_tests,node_playwright_tests,node_bdd_tests,node_pytest_cases,node_pytest_cases_2 toneRose
class node_pytest toneIndigo
```

## Components

### Browser Setup

- [Browser fixture](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/conftest.py): `playwright_base/conftest.py`

### UI Page Objects

- [User login](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/pageObjects/login.py): `playwright_base/pageObjects/login.py`
- [User dashboard](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/pageObjects/Dashboard.py): `playwright_base/pageObjects/Dashboard.py`
- [Order verification](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/pageObjects/UserOrders.py): `playwright_base/pageObjects/UserOrders.py`

### API Operations

- [API authentication](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/utils/API_testing.py): `playwright_base/utils/API_testing.py`
- [API order creation](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/utils/API_testing.py): `playwright_base/utils/API_testing.py`

### Automation Scenarios

- [BDD scenario](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/features/orderTransaction.feature): `playwright_base/features/orderTransaction.feature`
- [UI/API tests](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/test_UI_API.py): `playwright_base/test_UI_API.py`
- [Network tests](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/test_network.py): `playwright_base/test_network.py`
- [Playwright tests](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/test_playwright.py): `playwright_base/test_playwright.py`
- [BDD tests](https://github.com/0mprakashop/playwright_pytest/blob/main/playwright_base/test_bdd.py): `playwright_base/test_bdd.py`
- [PyTest cases](https://github.com/0mprakashop/playwright_pytest/blob/main/pytest/test_01.py): `pytest/test_01.py`
- [PyTest cases](https://github.com/0mprakashop/playwright_pytest/blob/main/pytest/test_02.py): `pytest/test_02.py`

### Other components

- **PyTest runner**
- **Browser engine**
- **Web client**
- **External API**

## Connections

- Browser fixture → Browser engine: launches (evidence: `playwright_base/conftest.py`)
- User login → Web client: navigates (evidence: `playwright_base/pageObjects/login.py`)
- User login → User dashboard: creates (evidence: `playwright_base/pageObjects/login.py`)
- User dashboard → Order verification: creates (evidence: `playwright_base/pageObjects/Dashboard.py`)
- API order creation → API authentication: gets token (evidence: `playwright_base/utils/API_testing.py`)
- API authentication → External API: posts login (evidence: `playwright_base/utils/API_testing.py`)
- API order creation → External API: posts order (evidence: `playwright_base/utils/API_testing.py`)
