Skip to content

Gitkrunixdev/project_root

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Multi‑Site Form Automation

Playwright + Python · Async · POM Architecture

Automated form submissions across multiple websites using a clean, modular, and scalable architecture.

Python Playwright License Status


📌 Overview

This project is a Proof of Concept demonstrating how to automate form submissions across different websites using:

  • Playwright for browser automation
  • Python (async) for concurrency
  • Page Object Model (POM) for clean structure
  • Centralized selectors for maintainability
  • JSON‑based test data for flexibility

The architecture is intentionally simple, readable, and easy to extend.


🧩 How It Works

Automation flow:

  1. Load browser and context
  2. Navigate to the selected website
  3. Load test data from test_data.json
  4. Fill form fields using reusable utilities
  5. Upload files if required
  6. Pause for preview (POC mode — no submission)

The project is structured so each website has its own page module and form logic, while shared utilities handle:

  • filling inputs
  • uploading files
  • logging
  • selectors
  • browser initialization

📁 Project Structure

project/
│
├── config/
│   └── settings.py
│
├── data/
│   ├── images/
│   └── test_data.json
│
├── pages/
│   ├── base_page.py
│   ├── ideakiln.py
│   ├── tinylaunchpad.py
│   └── tinylaunch.py
│
├── utils/
│   ├── browser.py
│   ├── form_filler.py
│   ├── selectors.py
│   └── logger.py
│
├── main.py
├── requirements.txt
└── LICENSE

🧱 Architecture Diagram

┌──────────────────────┐
│      main.py         │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│     Page Layer       │
│  (pages/_page.py)   │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│     Form Layer       │
│ (pages/_form.py)    │
└──────────┬───────────┘
│
▼
┌──────────────────────────────────────────┐
│                Utils Layer               │
│ form_filler.py · selectors.py · logger.py│
└──────────────────────────────────────────┘
│
▼
┌──────────────────────┐
│   Playwright Engine  │
└──────────────────────┘

🛠️ Installation

1. Create a virtual environment

bash
python -m venv venv
source venv/bin/activate   # Linux / macOS
venv\Scripts\activate      # Windows

2. Install dependencies

pip install -r requirements.txt

3. Install Playwright browsers

playwright install

▶️ Running the Automation

Run the main entry point:

python main.py

The script will:

  1. Launch Playwright

  2. Open the selected website

  3. Load test data from test_data.json

  4. Fill the form (POC mode — no submission)

5.Pause for preview


🧩 Adding a New Website

To add automation for a new site:

  1. Create a new file in pages/

  2. Add selectors in utils/selectors.py

  3. Add test data in data/test_data.json

  4. Implement:

  • load_test_data()

  • fill_form()

  • upload_files()

  • run_demo()

This architecture ensures minimal duplication and clean separation of responsibilities.


📌 Roadmap

  • Add automatic form submission

  • Add error handling and retry logic

  • Add screenshots and tracing

  • Add CLI for selecting which site to automate

  • Add unit tests for selectors and utilities


📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


About

Automation POC for multi‑site form filling (Python + Playwright)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages