
Start your journey into Python automation with pytest-playwright, building robust, scalable test scripts for web apps and mastering parallel execution and real-world best practices.
Explore Python automation with pytest and Playwright, covering introduction, installation, and setup of Python, the pytest-playwright plugin, and browsers, then execute a sample headless test.
Learn to run the first automation program with pytest and Playwright, launching Chromium, loading python.org, printing and asserting the page title, and closing the browser.
Explore how the page object model design pattern streamlines Python automation with pytest-playwright. Establish a three-layer structure: page, workflow, and test classes, plus a clear folder setup.
Learn a complete page object model (pom) part 2 demo in Python automation using pytest-playwright, building a from-scratch project with pages, workflows, and tests that print messages.
Learn to run and debug pytest tests in VS Code, configure Python tests, set breakpoints, and use Test Explorer commands to execute all tests or at cursor.
Explore Playwright locators in Python automation, using page.locator and selectors to identify and interact with DOM elements, leverage automatic wait, and verify text with get by text and exact options.
Explore Playwright locators part two in Python automation with Pytest Playwright, learning get by role, test id, label, placeholder, alt text, and title to locate and interact with elements.
Master Playwright locators and selectors, including id, name, class name, and tag name, as well as css and xpath, and learn locate, click, and fill in web automation.
Learn how Playwright assertions use the expect API to validate element visibility and attachment, with a default five-second timeout, in Python automation with Pytest-Playwright.
Explore Playwright assertions in Python automation, part two, including enabled, focused, hidden, in-viewport, visible, text contains, accessible description and name, and attribute and class checks with practical examples.
Explore Playwright assertions in pytest-playwright by validating element counts, css properties such as color and font, ids, js properties, roles, and text.
Demonstrate Playwright assertions in Python automation using Pytest-Playwright, including value, have values, title, URL, and select options checks, plus custom messages and per-assertion timeouts.
Playwright auto waiting automatically waits for elements to be ready before interactions, using actionability checks and automatic retries to reduce timing failures. Edge cases require explicit waits.
Explore how pytest fixtures handle setup and teardown, enabling reusable test data and environments. The lesson covers basic features, sample data in JSON, and fixture usage.
Explore pytest fixtures and their scopes—function, class, module, and session—and learn to set scope with scope='function', scope='class', scope='module', or scope='session', demonstrating use in VS code with sample data and pytest.mark.usefixtures.
Explore module scoped fixtures that run per Python file and share in conf test.py, and see session scoped fixtures execute once with auto use across test files.
Master parameterized fixtures and yield fixtures in pytest to pass data and perform setup and teardown. See function-scoped fixtures and request parameter usage with practical examples.
Define and use a session-scoped pytest fixture to initialize a Playwright browser, yield a page object for tests, and close the browser afterward during web testing.
Level: Beginner to Advanced
Prerequisites: Basic understanding of testing and web technologies (HTML, CSS, DOM).
This comprehensive course is designed to equip participants with the skills to build powerful browser automation frameworks using Python, Pytest, and Playwright. Through hands-on sessions and real-world examples, you will learn to automate web applications for functional testing, debug issues effectively, and optimize your test execution for maximum efficiency.
Starting with an introduction to automation principles and tools, you'll progress to setting up your environment, learning the essentials of Pytest for test creation and execution, and leveraging Playwright's robust browser automation capabilities. You will also explore advanced topics such as parallel test execution, debugging strategies, continuous integration (CI/CD) pipelines, and best practices for maintaining scalable test suites.
By the end of the course, you’ll be equipped to tackle automation challenges confidently, write maintainable test scripts, and integrate your tests into modern development workflows.
What You'll Learn:
Install and configure Pytest-Playwright for effective automation testing.
Write and execute automation tests for web applications.
Navigate and interact with web pages using Playwright’s APIs.
Optimize test execution with parallel test runs.
Debug and analyze test failures using Playwright's built-in tools.
Implement best practices for robust and scalable test frameworks.
Work on a real-world project to design and execute an automation suite.
Who Should Take This Course:
Aspiring QA Engineers and Automation Testers.
Developers looking to integrate testing into their workflows.
Professionals transitioning to browser automation frameworks.
Anyone interested in building scalable test solutions.