Browser Automation

An interactive elements analyzer using Playwright that crawls websites, identifies clickable elements, and generates visual reports with color-coded bounding boxes.

Features

  • Full Page Screenshot Capture — Complete page screenshots for visual analysis
  • Interactive Element Detection — Identifies:
    • Input fields (text, search, email, password)
    • Buttons (native and custom)
    • Links (anchor tags)
    • Custom elements with event listeners
  • Event Listener Detection — Heuristically identifies React, Vue, and inline handlers
  • Visual Reports — Color-coded bounding boxes:
    • Green: Input fields
    • Red: Buttons
    • Blue: Links
    • Orange: Generic interactive elements
  • Structured Output — JSON and text reports with detailed element metadata

Technical Highlights

  • Playwright for browser automation (Chromium)
  • Pillow + NumPy for image processing and visualization
  • JavaScript injection for DOM analysis
  • Event listener heuristics for framework detection
  • Python for all scripting

Tech Stack

ComponentTechnology
AutomationPlaywright
LanguagePython 3.11
Image ProcessingPillow, NumPy
BrowserHeadless Chromium

Usage

# Default (YouTube)
python main.py

# Custom URL
python main.py https://example.com