Who Is This Course For?
This course is designed for testers and developers who already have basic Python and Selenium experience. You will move from individual scripts to production-grade frameworks, then layer in AI capabilities — covering pytest, Selenium Grid, Jenkins, BDD, and Gemini API from first principles to hands-on projects.
Revision Classes — Python Advanced OOP & Selenium Advanced
The first few sessions of each batch cover a hands-on revision of Python Advanced OOP (strings, collections, *args/**kwargs, the four OOP pillars, exception handling) and Selenium Advanced techniques (XPath axes, ActionChains, Select, alerts, iFrames, Shadow DOM). Depth and pace are calibrated to each batch's existing level — these are not fixed-day modules.
Flaky tests are almost always a timing or data problem. This module shows you how to wait correctly, interact with SVG-based elements, and pull test data from the file formats you'll encounter in real projects.
- Explicit waits with
WebDriverWait+expected_conditions:visibility_of_element_located,element_to_be_clickable - SERE pattern: Scroll → Existence check → Readiness check → Element action
- SVG element interaction: locate
<svg>,<path>,<circle>nodes via XPath wildcards - CSV handling with
csv.readerand Pandasread_csv()— parameterised test data - Excel I/O with
openpyxl: read rows, write results, multi-sheet access pytest-rerunfailures: automatic retry for flaky network or rendering issues
Hard-coded values in test scripts are a maintainability nightmare. This module shows you how to externalise your configuration, load test data from JSON, and query databases directly.
- Config management with
configparser: read.ini/.cfgfiles for environment-specific settings - JSON test data:
json.load(), nested object traversal, writing results back to JSON - Database integration:
mysql-connector-python, parameterised queries withcursor.execute() - Pulling test data directly from a database into
@pytest.mark.parametrize - Environment switching (dev/staging/prod) without editing test files
A test suite that runs silently and dumps a wall of terminal output is hard to trust. This module teaches you to produce structured logs and beautiful reports that clearly show what passed, what failed, and exactly why.
- Python
loggingmodule:DEBUG,INFO,WARNING,ERRORlevels;FileHandler+StreamHandler - Rotating log files with
RotatingFileHandler— prevent logs growing unbounded - pytest-html: one-command HTML reports with
--html=report.html --self-contained-html - Allure framework:
@allure.step,@allure.description,@allure.severity,allure.attach() - Auto-attach screenshots on test failure using
pytesthooks andallure.attach() - Video recording with
ffmpegattached to Allure report on failure
Running a large suite sequentially on one machine takes too long. Selenium Grid distributes your tests across multiple browsers and machines — locally with Docker, or in the cloud with SauceLabs and BrowserStack.
- Selenium Grid architectures: Standalone, Hub-Node, and fully Distributed modes
- Grid setup with
selenium-server.jar:--role hub,--role node, capability matching - Docker Compose for Grid:
selenium/hub,selenium/node-chrome,selenium/node-firefoximages - Connecting to
RemoteWebDriverwith browserOptions() - SauceLabs and BrowserStack integration: tunnel setup, result tagging, session replay
- Parallel execution with
pytest-xdist:-n autoflag, fixture scope considerations
Manual test runs that depend on a person clicking "Run" are not CI/CD. This module teaches you to build a Jenkins pipeline that triggers automatically on every push to GitHub — and sends email alerts when tests fail.
- Jenkins installation, initial setup, and plugin management (Git, Allure, Email Extension)
- Connecting Jenkins to a private GitHub repository with SSH keys or tokens
- Creating a Freestyle job and a Pipeline job from scratch
- Writing a
Jenkinsfile:pipeline,stages,steps,postblocks - GitHub webhook setup: auto-trigger Jenkins build on
git push - Scheduled builds using CRON syntax and email notification on failure
A keyword-driven framework separates test design from test code. Test cases live in Excel — written with keywords like click, enter_text, verify_text — while your Python engine reads and executes them.
- Keyword architecture: Excel-based test cases → Python keyword dispatcher → Selenium actions
- Implementing a keyword library:
click_element(),enter_text(),verify_text(),navigate_to() - Reading test cases from Excel with
openpyxland iterating rows as test steps - Reporting pass/fail results back into the Excel file per test step
- Extending the keyword library without modifying existing test cases
Behaviour-Driven Development bridges the gap between business requirements and automated tests. Your .feature files are living documentation — readable by product managers, developers, and QA — while your step definitions are the actual test code.
- Gherkin syntax:
Feature,Scenario,Given,When,Then,And,But pytest-bddstep definitions with@given,@when,@thendecoratorsScenario Outline+Examplestable — data-driven BDD scenarios- Shared fixtures and browser setup in
conftest.py— scope management - Allure integration with BDD:
@allure.feature,@allure.story, step-level reporting - Video capture on failing scenarios with auto-attach to Allure
The Hybrid Framework is the culmination of everything you've built. It combines Page Object Model, fixture-based test management, parallel execution, and Allure reporting into a single, maintainable codebase — the architecture most product-company QA teams use.
- Hybrid framework structure:
pages/,tests/,data/,reports/,utilities/,conftest.py - Page Object Model: one class per page, locators and actions together, inheritance from
BasePage conftest.pyscoping:session-scoped driver fixture,function-scoped data fixtures- Parallel test execution with
pytest-xdist—-n 4workers - Full Allure report generation:
allure generate --cleanpipeline command - Grid mode toggle:
GRID=yes/noinconfig.properties— switch between local and remote
You don't need to be a data scientist to use AI in your work. This module gives you enough understanding to work confidently with AI models, then gets you building real tools using Google's Gemini API and a simple web interface.
- ML fundamentals: supervised vs unsupervised learning, training/test split, overfitting — with
scikit-learnexamples - Generative AI concepts: LLM tokens, prompt engineering, temperature, context windows
- Google Gemini API: authentication with API key,
google-generativeaiPython SDK, model selection - Building a test assistant chatbot: send prompts about your app and get test scenarios back
- Streamlit web app:
st.text_input(),st.button(),st.markdown()— deploy in 10 lines - AI Agent pattern:
function_callingwith Gemini — let the model decide which tool to invoke
n8n is an open-source workflow automation tool that connects apps through a visual interface. Think of it as an automation layer above your test infrastructure — routing data between Google Forms, Sheets, AI models, and email without writing plumbing code.
- n8n setup with Docker:
docker run -p 5678:5678 n8nio/n8n, persistence with volumes - Building your first workflow: Google Form trigger → Google Sheets append node
- Gemini AI node: send collected data to Gemini for analysis, summarisation, or classification
- Gmail / SMTP node: auto-send email with AI-generated summary on form submission
- Conditional branching:
IFnode to route workflows based on data values - Scheduling workflows: cron-based triggers for nightly data collection or report generation
AI is changing how automation code is written. This module teaches you to use AI to generate test scenarios, write Playwright scripts, and create agents that can browse the web on your behalf — including setting up Playwright MCP so your AI assistant has direct browser access.
- AI-assisted test scenario generation: prompt engineering for
Given/When/Thenoutput - Vibe coding workflow: describe the automation goal in natural language → review AI-generated Playwright code → refine iteratively
- Playwright MCP (Model Context Protocol): connect Claude/Gemini to a live browser instance
- Agentic AI in testing: multi-step agents that navigate, assert, and report using
function_calling - Reviewing and validating AI-generated test code — spotting hallucinated selectors and wrong assertions
- Integrating AI-generated scenarios into your existing pytest + Allure pipeline
The final module combines two cutting-edge capabilities: Healenium makes your Selenium tests self-repairing when a website's structure changes, and smolagents gives you a lightweight framework for building autonomous AI agents that can act on your behalf.
- Healenium architecture: proxy between WebDriver and browser — intercepts failed locator calls and recovers using ML similarity scoring
- Healenium setup: Docker-based backend (
healenium-backend+healenium-selector-imitator),HealingDriverwrapper - Self-healing in action: intentionally break a locator, watch Healenium find and heal it automatically
smolagents(Hugging Face): agent loop withCodeAgent, tool definition with@tooldecorator- Building a test agent: tool set includes
navigate(),click(),get_text(),assert_equals() - Agentic vs scripted automation — understanding when each approach is the right choice
Selenium Grid types
Standalone runs a single node + hub together. Hub-Node separates them — one hub manages multiple nodes. Distributed mode adds Router, Distributor, and Session Map as separate services for maximum scalability. Docker Compose makes Hub-Node the easiest to spin up and tear down.
What is the SERE pattern?
Scroll → Existence → Readiness → Element action. Before interacting with any element, you scroll it into view, wait for it to exist in the DOM, confirm it is clickable or interactable, then perform the action. This sequence eliminates most flakiness caused by timing and visibility issues.
How does pytest-bdd work?
You write .feature files in Gherkin. Each Given, When, Then line maps to a Python function decorated with @given, @when, @then. pytest runs these as normal test cases, so your full pytest ecosystem — fixtures, markers, Allure, xdist — works exactly the same way.
How does Healenium heal tests?
Healenium records the DOM context around every element your tests successfully find. When a locator fails in a future run, it queries its backend for the most similar DOM structure — using a tree similarity algorithm — and returns the best matching element. It also suggests an updated locator so you can fix the source permanently.
What is MCP and why does it matter?
Model Context Protocol is an open standard for giving AI models access to external tools and data sources. Playwright MCP specifically gives a model like Claude or Gemini the ability to control a real browser — navigate, click, read page content, and take screenshots — making it a true agentic browser automation tool.
What makes an AI agent different?
A script follows a fixed sequence of steps. An agent has a goal and a set of tools — it reasons about what to do next, picks a tool, acts, observes the result, and decides the next step. In smolagents, this loop is explicit: CodeAgent generates Python code as actions, executes them, and continues until the goal is achieved.