
Build a Playwright TypeScript project with API steps, data models, and a stateless page object design; run headless tests in GitHub Actions and publish Allure reports with videos and screenshots.
Explore automating a sign-up and login flow in a todo app, adding, completing, and deleting tasks, and navigating from sign up to the todos page as the core test scenario.
Create a new playwright project in a vs code folder with npm init playwright, choose TypeScript, set end-to-end tests location in the tests folder, and remove default tests and demos.
Automate the register test case using Playwright by visiting the sign up page, filling first name, last name, email, password, and confirming password, then submitting and asserting a welcome message.
Configure the project to run tests on chromium, firefox, and webkit, resolve email conflicts by submitting the test, and set headless to false to observe a passed test case.
Automate an end-to-end add todo flow in a playwright typescript project: register a user, click the plus icon, enter a new todo, submit, and verify the todo item appears.
Register a new user, create a todo, and delete it using the data test id delete; verify the no todos message appears after deletion.
Spot issues in the test framework—hardcoded environments and base urls, hardcoded test data, and too many assertions—and outline building an atomic framework in the next video.
Move the base URL to the playwright config, replace hard-coded values with the base URL and path usage, and run tests in parallel via the command line for faster CI/CD.
Replace hardcoded test data with faker-generated values for first name, last name, and email using faker.js; install, import, apply faker.name and faker.internet.email across tests, then run playwright tests.
Replace UI steps with API calls in Playwright to reduce flakiness and speed up tests, demonstrated by posting signup data to the server endpoint.
Register to the app with a post request to the API using Playwright's request fixture, sending email, first name, last name, and password to obtain login cookies.
extract the access token, first name, and user ID from the response body, print them for verification, and prepare cookies to simulate a logged-in user in Playwright.
Set cookies with Playwright using the context fixture to add cookies for access token, first name, and user ID, enabling direct navigation to the Todo page.
Leverage application programming interface calls to add todos via authenticated requests with access token, delete tests with minimal user interface steps to speed up end-to-end automation and reduce flakiness.
Create a TypeScript user model with private fields and getters, and use it in Playwright tests to replace faker data and centralize user creation.
Create a reusable user API class in TypeScript with signup functionality, refactor tests to use the API class, and reduce duplication for maintainable Playwright-based test suites.
Create a todo api class alongside the user api, implementing add todo and delete todo methods, and manage access token and user id with getters and setters for test usage.
Improve our user model by moving faker-based data generation into the model constructor and using an empty constructor, reducing test duplication and enabling parallel Playwright end-to-end tests.
Build a stateless signup page using the page object model to improve test readability and maintainability, with dedicated page methods for loading, filling inputs, and submitting the form.
Build the todo page using a stateless Playwright page object pattern in TypeScript, with lazy locators and methods that receive the page to load, add, delete, and verify no todos.
Learn to create a stateless new todo page using a Playwright TypeScript page object, load the page, define locators, and implement add todo via UI and API for robust tests.
Enable multi-environment testing by replacing hardcoded base URLs and cookies with a dynamic config from playwright.config for signup pages.
Install the Allure Playwright package as a dev dependency, configure it as the reporter in the Playwright config, then run tests to generate allure results and serve the report locally.
Enable video and screenshot attachments in Playwright, configure in the use section, run tests to generate Allure reports, and view attached media in Allure results.
Learn to run Playwright tests on the cloud and publish Allure reports via GitHub Actions and GitHub Pages, providing a public URL with images and videos.
Welcome to "Mastering Playwright: Building a Robust Framework for Real Websites with Best Practices, Reporting, Parallel Execution, Multi-Browser, and Environment Support"!
Are you ready to take your Selenium skills to the next level and build a complete automation framework for real-world websites? Look no further! This comprehensive Udemy course is designed to equip you with all the necessary knowledge and skills to create a robust Playwright framework that follows industry best practices.
In this course, we'll dive deep into the world of Playwright automation and cover everything you need to know to develop a top-notch framework. Whether you're a beginner or an experienced Playwright user, this course will provide you with the expertise to confidently tackle complex automation projects.
Throughout the course, we'll guide you through each step of the framework development process. You'll learn how to set up your project structure, implement the Stateless Page Object Model (POM) design pattern, and leverage the power of best practices to write maintainable and scalable automation scripts.
But that's not all! We understand the importance of reporting and parallel execution in automation projects. You'll discover how to integrate comprehensive reporting mechanisms into your framework, allowing you to analyze test results and generate detailed reports. Additionally, we'll explore parallel execution techniques, enabling you to execute tests concurrently, saving time and boosting efficiency.
Furthermore, we'll delve into the world of multi-browser and multi-environment support. You'll learn how to configure your framework to run tests across various browsers such as Chrome, Firefox, and Safari, ensuring compatibility with different user environments. We'll also cover environment-specific configurations, allowing you to seamlessly switch between test environments, such as development, staging, and production.
By the end of this course, you'll have a fully functional Playwright automation framework that incorporates best practices, comprehensive reporting, parallel execution, and multi-browser and multi-environment support. You'll be equipped with the skills to confidently automate tests for any real website and handle the complexities that come with it.
So, what are you waiting for? Join us on this exciting journey to master Playwright and build a powerful automation framework. Enroll now and take your Selenium automation skills to new heights!