# siddhibirje/selenium-ecommerce-automation architecture

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

- Interactive diagram: https://gitdiagram.com/siddhibirje/selenium-ecommerce-automation
- Repository: https://github.com/siddhibirje/selenium-ecommerce-automation

## Overview

This is a small Selenium page-object automation project for exercising SauceDemo login and purchase flows. The visible page model exposes login, inventory/cart, and checkout controls; shared page and element abstractions drive browser interactions. The test file is present in the tree but was not excerpted, so its calls and the precise end-to-end sequence cannot be verified. The graph therefore shows only source-supported relationships and leaves test-to-runtime wiring unasserted.

Main entry points: [`pages/base_element.py`](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/base_element.py) (Element interactions), [`pages/locator.py`](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/locator.py) (Locator tuple), [`pages/saucedemo_page.py`](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/saucedemo_page.py) (Login controls), [`pages/base_page.py`](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/base_page.py) (Base page navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scenario["Purchase scenario"]
  node_test["Login and purchase test"]
end

subgraph group_pages["Page objects"]
  node_login["Login controls<br/>[saucedemo_page.py]"]
  node_inventory["Inventory and cart<br/>[saucedemo_page.py]"]
  node_checkout["Checkout controls<br/>[saucedemo_page.py]"]
end

subgraph group_browser["Browser support"]
  node_basepage["Base page navigation<br/>[base_page.py]"]
  node_driver_factory["Chrome driver setup<br/>[drivers.py]"]
  node_element["Element interactions<br/>[base_element.py]"]
  node_locator["Locator tuple<br/>[locator.py]"]
end

node_saucedemo(("SauceDemo site"))
node_selenium["Selenium WebDriver"]

node_login -->|"creates locators"| node_locator
node_login -->|"wraps controls"| node_element
node_inventory -->|"creates locators"| node_locator
node_inventory -->|"wraps controls"| node_element
node_checkout -->|"creates locators"| node_locator
node_checkout -->|"wraps controls"| node_element
node_basepage -->|"navigates to"| node_saucedemo
node_driver_factory -->|"creates browser"| node_selenium
node_element -->|"waits and interacts"| node_selenium

click node_test "https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/login_and_purchase_test.py"
click node_login "https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/saucedemo_page.py"
click node_inventory "https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/saucedemo_page.py"
click node_checkout "https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/saucedemo_page.py"
click node_basepage "https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/base_page.py"
click node_driver_factory "https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/drivers.py"
click node_element "https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/base_element.py"
click node_locator "https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/locator.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_test toneBlue
class node_login,node_inventory,node_checkout toneAmber
class node_basepage,node_driver_factory,node_element,node_locator toneMint
class node_saucedemo,node_selenium toneIndigo
```

## Components

### Purchase scenario

- [Login and purchase test](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/login_and_purchase_test.py): `login_and_purchase_test.py`

### Page objects

- [Login controls](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/saucedemo_page.py): `pages/saucedemo_page.py`
- [Inventory and cart](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/saucedemo_page.py): `pages/saucedemo_page.py`
- [Checkout controls](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/saucedemo_page.py): `pages/saucedemo_page.py`

### Browser support

- [Base page navigation](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/base_page.py): `pages/base_page.py`
- [Chrome driver setup](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/drivers.py): `pages/drivers.py`
- [Element interactions](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/base_element.py): `pages/base_element.py`
- [Locator tuple](https://github.com/siddhibirje/selenium-ecommerce-automation/blob/main/pages/locator.py): `pages/locator.py`

### Other components

- **SauceDemo site**
- **Selenium WebDriver**

## Connections

- Login controls → Locator tuple: creates locators (evidence: `pages/saucedemo_page.py`)
- Login controls → Element interactions: wraps controls (evidence: `pages/saucedemo_page.py`)
- Inventory and cart → Locator tuple: creates locators (evidence: `pages/saucedemo_page.py`)
- Inventory and cart → Element interactions: wraps controls (evidence: `pages/saucedemo_page.py`)
- Checkout controls → Locator tuple: creates locators (evidence: `pages/saucedemo_page.py`)
- Checkout controls → Element interactions: wraps controls (evidence: `pages/saucedemo_page.py`)
- Base page navigation → SauceDemo site: navigates to (evidence: `pages/base_page.py`)
- Chrome driver setup → Selenium WebDriver: creates browser (evidence: `pages/drivers.py`)
- Element interactions → Selenium WebDriver: waits and interacts (evidence: `pages/base_element.py`)
