Playwright + Google ADK + RAG + DOM Diff + Real-Time Chat UI
Created by Pramod Dutta (The Testing Academy)
This is a fully autonomous AI QA testing agent that converts plain English instructions into real browser automation, using:
- Python
- Playwright
- Google ADK (Agent Developer Kit)
- Retrieval-Augmented Generation (RAG)
- DOM Comparison Engine
- Vector DB (Chroma)
- Real-time Chat UI (React + TailwindCSS)
- WebSocket Streaming
You type:
βOpen app.vwo.com β attempt invalid login β verify error message.β
The agent:
- Understands your text
- Plans each browser action
- Runs steps in Playwright
- Captures DOM after each step
- Uses RAG + DOM diff + pattern matching to verify
- Streams everything in a chat-like interface
No scripts.
No locators.
No coding.
This is the future of automation testing.
Traditional test automation is:
β Slow
β Fragile
β Code-heavy
β Hard to maintain
This framework brings:
β Scriptless testing
β Self-verifying steps
β AI-driven test planning
β DOM-intelligent validation
β Fully conversational automation
ββββββββββββββββββββββββββββββββ
β Chat UI β
β (React + Tailwind + WS) β
ββββββββββββββββ¬ββββββββββββββββ
β instruction
βΌ
ββββββββββββββββββββββββββββββββ
β FastAPI Backend β
β WebSocket Streaming β
ββββββββββββββββ¬ββββββββββββββββ
β passes request
βΌ
ββββββββββββββββββββββββββββββββ
β ADK Agent Core β
β - LLM Reasoning (Gemini) β
β - Step Planner β
β - Tool Orchestration β
ββββββββββββββββ¬ββββββββββββββββ
β generated steps
βΌ
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
β Playwright Executor β ---> β DOM Capture β
β - Real browser automation β β - DOM HTML β
β - Click, Type, Navigate β β - Element snapshot β
ββββββββββββββββ¬βββββββββββββββ ββββββββββββββββ¬ββββββββββββββββ
β DOM β
βΌ βΌ
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
β RAG Verifier β β DOM Diff Engine β
β - Chroma Vector DB β β - Pattern matching β
β - Embedding comparison β β - Error detection β
ββββββββββββββββ¬βββββββββββββββ ββββββββββββββββ¬ββββββββββββββββ
β results β diff
βΌ βΌ
ββββββββββββββββββββββββββββββββ
β Report Engine β
β (JSON / Allure-ready) β
ββββββββββββββββββββββββββββββββ
adk-playwright-agent/
βββ README.md
βββ requirements.txt
βββ Dockerfile
βββ .env.example
β
βββ app/
β βββ main.py # FastAPI + WebSocket server
β β
β βββ agent/
β β βββ agent_core.py # ADK-style orchestrator
β β βββ planner.py # Natural language β Steps
β β βββ tools.py # Tool bindings (click, type, etc.)
β β βββ **init**.py
β β
β βββ executor/
β β βββ playwright_executor.py # Real browser automation
β β βββ dom_capture.py # DOM snapshot utilities
β β βββ **init**.py
β β
β βββ verifier/
β β βββ dom_compare.py # DOM diff + embeddings verify
β β βββ rag_store.py # Chroma vector DB
β β βββ **init**.py
β β
β βββ reporting/
β β βββ report.py # JSON test report
β β βββ **init**.py
β β
β βββ utils/
β βββ helpers.py # Shared helpers
β βββ **init**.py
β
βββ frontend/
β βββ index.html
β βββ vite.config.js
β βββ package.json
β βββ tailwind.config.js
β βββ src/
β βββ App.jsx
β βββ main.jsx
β βββ components/
β β βββ ChatMessage.jsx
β β βββ InputBox.jsx
β
βββ examples/
βββ invalid_login.json
Example:
"Open app.vwo.com and verify invalid login."
β navigate
β type username
β type password
β click login
β assert error message
- Opens browser
- Performs actions
- Captures DOM
- Error text
- Similarity to past error pages
- DOM structural differences
- Embedding comparison
Every step streams live:
βΆ Step started: navigate
β Step completed
βΆ Verifying DOM...
git clone https://github.com/yourname/adk-playwright-agent
cd adk-playwright-agentpip install -r requirements.txtplaywright installLLM_PROVIDER=ollama
OLLAMA_HOST=http://localhost:11434
CHROMA_PERSIST_DIR=./chroma
PLAYWRIGHT_HEADLESS=falseuvicorn app.main:app --reload --port 8080cd frontend
npm install
npm run devOpen browser: π http://localhost:5173
/assets/chat-ui.png
/assets/test-run.png
/assets/dom-verify.png
- Screenshot pixel diff
- Automatic locator healing
- XHR/Network validation
- Planner agent
- Locator agent
- Execution agent
- Verification agent
- Auto-generate test cases
- Self-healing flows
- Allure integration
- Visual diffs
- Failure heatmaps
- Cloud dashboard
- Test run history
- Team collaboration
- Webhooks + API keys
Pull Requests are welcome!
- Add more agents
- Improve DOM verification
- Add new UI features
- Extend RAG pipeline
- Improve planner
MIT License.
Built with β€οΈ by Pramod Dutta β The Testing Academy
---
If you want, I can also generate:
β
README Banner image
β
GitHub Wiki pages
β
API Documentation
β
Full Java version of the framework
π‘ Just tell me!