Choose your language
Playwright, Python, and Pytest for Web Automation Testing Course
More than 2 million students worldwide

Playwright, Python, and Pytest for Web Automation Testing Course

Master web automation testing with Playwright, Python, and Pytest — the modern stack trusted by professional QA engineers. Go from Python fundamentals to advanced browser control, API mocking, and CI/CD pipeline integration. Build a production-ready test framework using the Page Object Model and industry-proven design patterns.

Dedika for Business

What you will learn:

  • Configure Playwright with Pytest to run cross-browser, parallel automated test suites.

  • Build a scalable Page Object Model framework using Python OOP and Pytest fixtures.

  • Intercept and mock network requests to isolate front-end behavior from live APIs.

  • Automate complex UI interactions including file uploads, dialogs, and dynamic content.

  • Integrate the full test suite into a CI/CD pipeline with automated reporting and retries.

  • Apply visual regression, accessibility audits, and mobile emulation within a single framework.

How you study in practice Playwright, Python, and Pytest for Web Automation Testing Course

How you practise Playwright, Python, and Pytest for Web Automation Testing Course

For companies looking to train their team

With Dedika for Business, the course includes exercises and examples tailored to your own business and the way your company needs.

Click here

Course Content

8 Chapters • 40 LessonsDuration between 4 and 360 hours (you decide)

Chapter 1See details

Python Foundations for Test Automation

  • Lesson 1 • Core Python Data Types and Control Flow

    Master strings, lists, dicts, and loops as the building blocks of test data handling. Directly enables dynamic selector construction and data-driven testing later.

  • Lesson 2 • Object-Oriented Programming Basics

    Apply classes, inheritance, and encapsulation to model page objects and test fixtures. Provides the structural foundation for the Page Object Model introduced later.

  • Lesson 3 • Python Environment Setup

    Install Python, configure virtual environments, and manage packages with pip. Establishes the reproducible workspace every subsequent chapter depends on.

  • Lesson 4 • File I/O and Data Formats

    Read and write JSON, CSV, and plain text files for test data management. Enables external data-driven test scenarios covered in later chapters.

  • Lesson 5 • Functions and Modules

    Define reusable functions, handle exceptions, and organize code into modules. Prepares students to build maintainable helper libraries for test suites.

Chapter 2See details

Pytest Fundamentals and Test Organization

  • Lesson 1 • Pytest Installation and Test Discovery

    Install Pytest, understand naming conventions, and run first tests. Establishes the test runner that all automation scripts in this course will use.

  • Lesson 2 • Markers, Parametrize, and Filtering

    Tag tests with markers and generate multiple test cases from a single function using parametrize. Enables targeted test runs and data-driven scenarios.

  • Lesson 3 • Fixtures for Setup and Teardown

    Define fixtures with scope levels to manage browser instances and test state. Fixtures are the primary mechanism for sharing Playwright browser objects across tests.

  • Lesson 4 • Configuration and Plugins

    Configure Pytest via pytest.ini and conftest.py, and extend it with essential plugins. Prepares the project structure used throughout all remaining chapters.

  • Lesson 5 • Assertions and Failure Reporting

    Use Pytest's assertion introspection to write expressive checks and interpret failure output. Directly improves debugging speed throughout the course.

Chapter 3See details

Playwright Core Concepts and Browser Control

  • Lesson 1 • Auto-Waiting and Timeout Configuration

    Understand Playwright's built-in auto-wait mechanism and configure timeouts globally and per action. Eliminates the need for explicit sleep calls that cause flaky tests.

  • Lesson 2 • Playwright Architecture and Installation

    Understand how Playwright communicates with browsers via the DevTools Protocol and install the Python package. Sets the conceptual model for all subsequent browser interactions.

  • Lesson 3 • Selectors and Locator Strategies

    Use Playwright's Locator API with CSS, XPath, text, role, and test-id selectors. Choosing robust selectors is the single most impactful skill for test stability.

  • Lesson 4 • Page Navigation and Basic Interactions

    Navigate URLs, click elements, fill forms, and capture screenshots with the Page API. These primitives underpin every test written in later chapters.

  • Lesson 5 • Launching Browsers and Contexts

    Launch Chromium, Firefox, and WebKit, and create isolated browser contexts. Isolation via contexts is the foundation for parallel and multi-session testing.

Chapter 4See details

Integrating Playwright with Pytest

  • Lesson 1 • Parallel Test Execution with pytest-xdist

    Run tests concurrently using pytest-xdist to reduce total suite execution time. Requires understanding of fixture scoping and test isolation introduced earlier.

  • Lesson 2 • pytest-playwright Plugin Setup

    Install and configure pytest-playwright, which provides built-in browser and page fixtures. Removes boilerplate and standardizes browser lifecycle management across the suite.

  • Lesson 3 • Writing First Playwright-Pytest Tests

    Write end-to-end tests that navigate, interact, and assert using the integrated stack. Validates that the environment is correctly configured before adding complexity.

  • Lesson 4 • Custom Fixtures for Browser Management

    Extend built-in fixtures to set base URLs, authentication state, and custom context options. Custom fixtures are the primary extension point for project-specific requirements.

  • Lesson 5 • Reporting and Debugging Test Runs

    Generate HTML reports, capture screenshots on failure, and use Playwright traces for debugging. Establishes the feedback loop that accelerates test maintenance.

Chapter 5See details

Element Interaction and Form Automation

  • Lesson 1 • Keyboard and Mouse Interactions

    Simulate keyboard shortcuts, drag-and-drop, and precise mouse movements for rich UI components. Covers interactions that cannot be achieved with simple click and fill calls.

  • Lesson 2 • Handling Dynamic and Async Content

    Wait for elements rendered by JavaScript frameworks and handle content that appears after user actions. Directly addresses the most common source of flaky tests in modern SPAs.

  • Lesson 3 • Dialogs, Frames, and Shadow DOM

    Handle browser dialogs, switch between iframes, and pierce Shadow DOM boundaries. Covers legacy and modern component patterns that require special Playwright APIs.

  • Lesson 4 • File Upload and Download Handling

    Automate file input elements and intercept browser download events. Enables testing of document management and export features common in enterprise apps.

  • Lesson 5 • Advanced Form Controls

    Automate dropdowns, date pickers, radio buttons, and multi-select lists beyond basic fill. Covers the full range of HTML form controls encountered in real applications.

Chapter 6See details

Network Interception and API Testing

  • Lesson 1 • API Testing with Playwright's APIRequestContext

    Send HTTP requests directly without a browser using APIRequestContext for pure API tests. Combines UI and API assertions in a single Pytest session for end-to-end coverage.

  • Lesson 2 • Testing WebSockets and Server-Sent Events

    Monitor WebSocket frames and server-sent event streams triggered by browser interactions. Covers real-time communication patterns found in chat, dashboards, and live feeds.

  • Lesson 3 • Authentication Flows and State Management

    Automate login flows, persist authentication cookies, and reuse session state across tests. Reduces test execution time by avoiding repeated login sequences.

  • Lesson 4 • Request Interception and Mocking

    Intercept outgoing requests and return mock responses to isolate UI behavior from live APIs. Enables fast, deterministic tests that do not depend on back-end availability.

  • Lesson 5 • Monitoring Network Traffic

    Capture and inspect HTTP requests and responses triggered by browser actions. Provides visibility into the network layer that underpins all subsequent interception techniques.

Chapter 7See details

Page Object Model and Framework Design

  • Lesson 1 • Project Structure and Configuration Management

    Organize the project into logical directories and manage environment-specific configuration. Establishes the folder layout and config strategy used in professional automation teams.

  • Lesson 2 • Component and Fragment Objects

    Model reusable UI components such as navigation bars and modals as separate component classes. Extends POM to handle shared widgets that appear across multiple pages.

  • Lesson 3 • Page Object Model Principles

    Encapsulate page-specific locators and actions in dedicated classes to separate test logic from UI details. Reduces duplication and localizes the impact of UI changes to a single class.

  • Lesson 4 • Data Management and Test Data Factories

    Generate and manage test data using factory functions and external data sources. Decouples test logic from hardcoded values and supports data-driven test scenarios.

  • Lesson 5 • Fixture-Based Dependency Injection

    Inject page objects into tests via Pytest fixtures to decouple object creation from test logic. Enables clean test functions that read as plain-language specifications.

Chapter 8See details

Advanced Playwright Techniques and CI/CD Integration

  • Lesson 1 • Mobile and Responsive Testing

    Emulate mobile devices, touch events, and geolocation to test responsive layouts. Covers the device emulation API that eliminates the need for physical devices in CI.

  • Lesson 2 • CI/CD Pipeline Integration

    Configure a CI/CD pipeline to install dependencies, run the full test suite, and publish reports. Automates quality gates so every pull request is validated before merging.

  • Lesson 3 • Test Maintenance and Flakiness Management

    Identify, quarantine, and fix flaky tests using retry strategies and diagnostic tooling. Sustains long-term suite reliability as the application under test evolves.

  • Lesson 4 • Visual Regression Testing

    Capture baseline screenshots and compare them pixel-by-pixel to detect unintended UI changes. Adds a visual quality gate that complements functional assertions.

  • Lesson 5 • Performance and Accessibility Assertions

    Measure page load timing and run accessibility audits within Playwright tests. Integrates non-functional quality checks into the same test suite as functional tests.

Certification

Your valid completion certificate

This course is for you:

  • Manual testers ready to transition into writing automated browser tests.

  • Junior developers who want to add QA automation skills to their toolkit.

  • Career changers entering software testing from non-technical backgrounds.

  • Python hobbyists curious about applying their skills to real-world testing.

  • QA analysts tired of repetitive regression cycles and seeking faster workflows.

  • DevOps engineers who need reliable test suites wired into their pipelines.

What our students say

Your classes are perfect. I purchased the one-year package and finally have the opportunity to follow various topics of interest without needing to switch platforms... I thank you for everything you do, I've already recommended you to other people...
Giulio Carlo
Giulio CarloDigital Marketing Student
I like how the lessons are straight to the point and how I can change chapters and skip content I don't need.
Mariana Ferres
Mariana FerresPhotography Student
I like the content and the presentation style and video transcription, which speeds up the process!
Luciana Alvarenga
Luciana AlvarengaNail Design Student
The platform is fast, simple to use. The diversity of content and complementary videos really help with learning.
André Felipe
André FelipePrompt Engineering Student

Top training programs

FAQ

Who is Dedika?

Is the certificate valid in Canada?

Are the courses free?

What is the course workload?

What are the courses like?

How do the courses work?

What is the duration of the courses?

What is the cost or price of the courses?

What is an EAD or online course and how does it work?

PDF Course