# guptasakshi01/page-object-python-selenium architecture

> Architecture diagram of the GitHub repository guptasakshi01/page-object-python-selenium, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/guptasakshi01/page-object-python-selenium
- Repository: https://github.com/guptasakshi01/page-object-python-selenium

## Overview

##### Project Type Analysis
This is an automated testing framework using the Page Object Model pattern, built with Python and Selenium WebDriver. The project is specifically designed for web application testing, with Amazon.com as the target application.

##### Key Components

A. Core Framework Layer:
- BasePage (Foundation)
- Test Base Layer
- Utilities Layer

B. Page Objects Layer:
- Individual Page Classes
- Page-specific Methods

C. Test Layer:
- Test Cases
- Test Execution

D. External Components:
- Web Browser (via Selenium WebDriver)
- Target Application (Amazon.com)

**[External Systems Layer]**

**[Page Objects Layer]**

**[Core Framework Layer]**

**[Test Layer]**

##### Component Relationships

- BasePage → HomePage
- BasePage → LoginPage
- BasePage → MainPage
- BasePage → SignupPage
- BaseTest → Test Classes

- Page Objects → Locators
- Tests → Page Objects
- Page Objects → WebDriver

##### Detailed Component Breakdown

Core Framework Layer:
**┌─────────────┐**
- BasePage   │ ← Include core WebDriver interactions
- ┘

**┌─────────────┐**
- BaseTest   │ ← Include test setup and teardown
- ┘

Utilities Layer:
**┌───────────┐    ┌──────────┐    ┌──────────┐**
- Locators  │    │  Users   │    │Test Cases│
- ┘    └──────────┘    └──────────┘

Page Objects Layer:
**┌───────────┐    ┌────────────┐    ┌────────────┐**
- HomePage  │    │ LoginPage  │    │ SignupPage │
- ┘    └────────────┘    └────────────┘

##### Important Notes

- Hierarchical structure of the POM implementation
- Separation of concerns between pages, tests, and utilities
- Flow of test execution
- How the framework interacts with the target application

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph External["External Systems"]
        Browser["Web Browser"]
        Amazon["Amazon.com"]
    end

    subgraph Pages["Page Objects Layer"]
        BasePage["Base Page"]:::core
        HomePage["Home Page"]:::page
        LoginPage["Login Page"]:::page
        MainPage["Main Page"]:::page
        SignupPage["Signup Page"]:::page
    end

    subgraph Core["Core Framework Layer"]
        BaseTest["Base Test"]:::core
        WebDriver["WebDriver Manager"]:::core
    end

    subgraph Utils["Utilities Layer"]
        Locators["Locators"]:::util
        Users["Users"]:::util
        TestCases["Test Cases"]:::util
    end

    subgraph Tests["Test Layer"]
        SignInTest["Sign In Tests"]:::test
    end

    %% Relationships
    Browser --> Amazon
    WebDriver --> Browser
    BasePage --> WebDriver
    BaseTest --> WebDriver

    %% Page Object Inheritance
    BasePage --> HomePage
    BasePage --> LoginPage
    BasePage --> MainPage
    BasePage --> SignupPage

    %% Test Dependencies
    BaseTest --> SignInTest
    SignInTest --> HomePage
    SignInTest --> LoginPage
    SignInTest --> MainPage
    SignInTest --> SignupPage

    %% Utility Dependencies
    HomePage --> Locators
    LoginPage --> Locators
    MainPage --> Locators
    SignupPage --> Locators
    SignInTest --> TestCases
    SignInTest --> Users

    %% Click Events
    click BasePage "https://github.com/guptasakshi01/page-object-python-selenium/blob/master/pages/base_page.py"
    click BaseTest "https://github.com/guptasakshi01/page-object-python-selenium/blob/master/tests/base_test.py"
    click HomePage "https://github.com/guptasakshi01/page-object-python-selenium/blob/master/pages/home_page.py"
    click LoginPage "https://github.com/guptasakshi01/page-object-python-selenium/blob/master/pages/login_page.py"
    click MainPage "https://github.com/guptasakshi01/page-object-python-selenium/blob/master/pages/main_page.py"
    click SignupPage "https://github.com/guptasakshi01/page-object-python-selenium/blob/master/pages/signup_page.py"
    click SignInTest "https://github.com/guptasakshi01/page-object-python-selenium/blob/master/tests/test_sign_in_page.py"
    click TestCases "https://github.com/guptasakshi01/page-object-python-selenium/blob/master/utils/test_cases.py"
    click Locators "https://github.com/guptasakshi01/page-object-python-selenium/blob/master/utils/locators.py"
    click Users "https://github.com/guptasakshi01/page-object-python-selenium/blob/master/utils/users.py"

    %% Styles
    classDef core fill:#f9f,stroke:#333,stroke-width:2px
    classDef page fill:#ddf,stroke:#333,stroke-width:1px
    classDef util fill:#dfd,stroke:#333,stroke-width:1px
    classDef test fill:#ffd,stroke:#333,stroke-width:1px

    %% Legend
    subgraph Legend
        CoreComponent["Core Component"]:::core
        PageObject["Page Object"]:::page
        UtilityComponent["Utility Component"]:::util
        TestComponent["Test Component"]:::test
    end
```
