Who Is This Course For?
For QA engineers and automation testers who already work with Python and Selenium and want to add real AI capabilities to their toolkit. You will use google-generativeai, streamlit, smolagents, and Healenium — building practical tools that you can deploy in your actual work, not just toy demos.
You don't need to be a data scientist to use AI in your work. This module gives you enough foundational knowledge to work confidently with AI models, then gets you building real tools immediately using Google's Gemini API.
- AI system components: Algorithm + Data + Model — the three building blocks of every AI application
- ML fundamentals with
scikit-learn: train a model, make predictions, understand overfitting - LLM concepts: tokens, context window, temperature, top-k — what they mean and how they affect output
- Gemini API:
genai.configure(api_key=KEY),model.generate_content(), readingresponse.text - Stateful chatbot:
model.start_chat(history=[]),chat.send_message()— maintains conversation context - Streamlit UI:
st.text_input(),st.button(),st.session_state— web app in under 20 lines - AI Agent pipeline: read questions from Excel with
openpyxl→ send to Gemini → email answers via SMTP - System prompt engineering: restrict Gemini to domain-specific answers with a well-crafted system instruction
n8n connects apps through a visual node editor — no custom integration code for each service. You build a pipeline once and it runs automatically: form submitted → data collected → AI analyses it → email sent.
- n8n setup:
docker run -d -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n; access atlocalhost:5678 - Google Cloud Console: create project, enable Sheets API + Gmail API, create OAuth2 Client ID
- Google Sheets trigger node: poll for new rows, extract
{{ $json.Name }}and{{ $json.Question }} - Gemini AI node: send prompt, receive response at
{{ $json.content.parts[0].text }} - Gmail node: send HTML email with merged fields from Sheets + Gemini response
- IF node: conditional branching — route based on field values
- Cron trigger: schedule workflow runs at fixed intervals
AI is changing how test automation code gets written. This module teaches you to use AI as a genuine productivity multiplier — from generating test scenarios to writing Playwright scripts to controlling a live browser via MCP.
- AI test scenario generation: prompt engineering to produce Given/When/Then output from a requirements document
- AI test data generation: boundary values, invalid inputs, edge cases — on demand
- Vibe coding workflow: natural language description → AI-generated Playwright script → human review → refine
- AI for legacy code: paste a function, ask for an explanation, trace logic without reading every line
- AI for root-cause analysis: paste a failing traceback, receive a structured explanation + fix suggestion
- MCP — Model Context Protocol: standardised interface connecting AI models to external tools and services
- Playwright MCP setup: install
@playwright/mcp, configure in VS Code, connect to Claude/Gemini Copilot Chat - Agentic AI: orchestrator model delegates to specialised sub-agents; observe the full flight → payment → email agent pipeline
The final module combines two powerful capabilities: Healenium makes your Selenium tests self-repairing when a website changes, and smolagents gives you a lightweight framework for building autonomous AI agents that can act independently toward a goal.
- AI Agent vs Agentic AI: single-task tool (Gemini email agent) vs multi-step orchestrator (smolagents pipeline)
- HuggingFace
smolagents:pip install "smolagents[toolkit]", define tools with@tooldecorator - Agent loop:
CodeAgentgenerates Python → executes → observes result → decides next step → repeats until goal met - Healenium architecture: ML-powered proxy sits between your test code and ChromeDriver — records DOM snapshots, recovers on failure
- Docker setup:
docker-compose up -dpullshealenium-backend+healenium-selector-imitator+ PostgreSQL - Replace
ChromeDriver()withSelfHealingDriver(ChromeDriver(), config)— one-line change, full self-healing - Dashboard:
localhost:8085/healenium/report— healed element count, old XPath vs new XPath, screenshot diff - When to use agentic vs scripted: scripted = predictable flows; agentic = exploratory, adaptive, new-page scenarios
What is MCP and Playwright MCP?
Model Context Protocol is an open standard for connecting AI models to external tools. Playwright MCP specifically gives Claude or Gemini direct browser control — navigate, click, fill forms, screenshot, read DOM — making it a genuine agentic browser automation tool rather than just a code generator.
What did you build with the Gemini API?
A stateless Q&A chatbot, a stateful chatbot with chat.history, a Streamlit web interface, and a fully automated AI agent that reads questions from Excel with openpyxl, queries Gemini, and emails answers via Gmail SMTP — no human intervention between question and answer.
How does Healenium work technically?
Healenium proxies between SelfHealingDriver and ChromeDriver. On first run it records DOM snapshots of each element in a PostgreSQL store. When a locator fails later, it uses a tree-similarity algorithm against stored snapshots to find the best match, updates the locator, continues the test, and logs the change in the dashboard.
What is vibe coding in practice?
In practice: open Playwright MCP in VS Code, describe the test in Copilot Chat ("log in with these credentials and verify the dashboard loads"), receive generated Playwright code, read it carefully for correctness, then refine. The AI writes the scaffold; you ensure correctness, add edge cases, and integrate it into the framework.
What does smolagents' CodeAgent do differently?
CodeAgent doesn't just call a single tool — it generates actual Python code as its action at each step of the agent loop. It executes the code, observes the output, then decides what Python to generate next. This makes it flexible enough to handle tasks that weren't explicitly scripted.
When would you use n8n over Python code?
Use n8n when connecting pre-existing services (Google Sheets, Gmail, Slack, GitHub) with standard data flows — it handles OAuth, retries, and error workflows out of the box. Write Python when you need custom logic, complex data transformations, or tight integration with your existing pytest/Selenium codebase.