
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore course design and approach for learning Playwright with JavaScript and TypeScript, starting with JavaScript, then refactoring to TypeScript, and building end-to-end user interface and API automation frameworks with examples.
Install node.js to run JavaScript and set the path, then install Visual Studio Code as your editor. Use npm init playwright to install Playwright dependencies for a new project.
Create an empty project in Visual Studio Code, then run npm init playwright to install Playwright and generate a JavaScript skeleton with a tests folder, config, and dependencies.
Create a .spec.js test under the test folder, import test from Playwright, and use an async function with await for each step to ensure sequential execution.
Learn how Playwright uses global fixtures, browser context, and page fixtures to open a fresh browser instance, create new pages, and manage cookies and proxies for tests.
Discover a consolidated hub on RahulShettyAcademy.com for practice websites, apis, and apps used in this course, including web automation, api testing, mobile apps, and qa news.
explore how the default playwright configuration file drives test execution—defining the test directory, browser (Chromium), and 30s timeouts, with options to override and run via npx playwright test.
Learn to assert page titles in Playwright tests with expect to have title, and run the same tests across multiple browsers (chrome, firefox, webkit) via configuration.
Learn how Playwright locates elements with CSS selectors and XPath and builds selectors from id, class, and attributes; use fill and click with 5s assertion and 30s global timeouts.
Learn to extract error messages from a web page using Playwright with a dynamic login error, locate by style attributes, wait for elements, and assert on text content.
Learn to work with locators that return multiple web elements in Playwright, selecting the first item with first or nth, and using type versus fill to manipulate inputs.
Learn how the wait mechanism handles lists of elements in Playwright. Discover grabbing all product titles in one step and verifying them with text contents.
Learn how to use Playwright to wait dynamically for page data in service-based apps, using network idle, locator waits, and robust synchronization strategies.
Learn to handle static select dropdowns in Playwright by selecting options via value attributes with proper selectors, then interact with radio buttons and web-based popups.
select and verify radio buttons and checkboxes using expect assertions in Playwright, validating locator is checked or unchecked and using boolean outputs to drive fail-fast test logic.
Master async/await with Playwright assertions to validate attributes, such as the blinking text class, and manage locators and variables within expect blocks.
Learn to handle child windows in Playwright by switching browser context, waiting for new page events, and using promise.all to interact with the child page before returning to the parent.
Understand the difference between textContent and inputValue in Playwright, showing when to read static DOM text versus dynamic input after typing into a form field.
Demonstrates end-to-end automation of an e-commerce app using Playwright JS/TS: sign in, select and add products, checkout with a coupon, verify orders in history, and handle frames and popups.
In Playwright JS/TS automation, dynamically locate a target product in a list, read its title, and click add to cart when matched.
Learn to add assertions for add-to-cart actions and implement synchronization in Playwright tests by waiting for card content to load, using text-based and tag-specific locators, and validating cart items with robust waits.
Learn to handle auto suggestive dropdowns in Playwright with a practical checkout flow, using text and CSS locators, sequential typing, waiting for suggestions, and iterating options to select India.
Learn to implement an end-to-end Playwright test for placing an order, validate the login email display, assert the 'thank you' message, and extract the generated order ID for output.
Dynamically locate and open your specific order from the order history using Playwright script logic, including table row traversal, precise locator strategies, and navigation to the details page for verification.
Learn Playwright’s special locators such as get by label, get by role, and get by placeholder. See how the Playwright UI Runner runs tests and shows step-by-step results with screenshots.
Learn to locate elements with get by placeholder, get by role, and get by text in Playwright, then chain locators and filters to fill inputs, submit, and add to cart.
Understand when getByLabel works for filling edit boxes in Playwright, depending on label-input association via wrapping or for attribute linkage; when not associated, use placeholders as identifiers.
Rewrite an end-to-end test in Playwright using get by role, get by placeholder, and text filters to locate product cards, add to cart, and complete checkout.
Learn to automate calendar selection with Playwright by driving month, year, and date from test parameters, using locators, text matching, and assertions to verify the chosen date.
Validate calendars end-to-end in Playwright by locating a common input group, iterating with a for loop through month, date, and year values, and asserting actual values against expected.
Debug Playwright scripts with the built-in Playwright Inspector, stepping through tests, inspecting locators (get by label, get by role, CSS selectors), and generating reliable selectors at runtime for issue resolution.
Use Playwright Codegen to record an end-to-end e-commerce flow, capturing locators and assertions, then copy the generated script and adapt it to JavaScript, TypeScript, or Java.
Navigate Playwright's reporting workflow by enabling screenshots and trace in your config, generate HTML reports from test results, and read failure traces and screenshots to debug efficiently.
Learn to validate element visibility with Playwright by asserting visible and hidden states using expect.
Learn to handle JavaScript dialogs and alert popups in Playwright by listening for dialog events and using accept or dismiss, and hover to reveal menus.
Master frame handling in Playwright by switching to a child frame via frame locators. Extract the subscriber count inside the frame by locating text in visible elements.
**Course last updated on June 2026 with Playwright Agents & MCP's demo **
Welcome to the comprehensive Playwright course that covers everything from the basics to frameworks + AI Agents, including TypeScript & JavaScript fundamentals without need of any prior programming experience.
This course is entirely practical. We will use a fully functional e-commerce application for testing and learn how to automate every scenario of the application, including dynamic components often used in modern React and Angular applications.
We will also explore how to perform API testing to create data within the application using Playwright.
The course will show you how to conduct end-to-end functional testing, which includes both UI testing and API testing in a single script. This script creates data, tests scenarios, and deletes the data.
Advanced topics are discussed, such as grabbing session cookies using APIs and responses to bypass the UI login screen for faster and more reliable execution.
Everything is possible with Playwright, and this course demonstrates a systematic way to handle complex e-commerce applications with strategically designed automated test cases.
The course covers two powerful frameworks for designing test cases:
Playwright Cucumber BDD Framework
Playwright with Mocha
These two frameworks are built on top of page object design patterned tests, which take data from external sources and use custom utility methods to produce outstanding HTML reports.
Finally, the complete framework will be integrated with CI/CD Jenkins and use Docker containers to run the tests.
It's important to note that Playwright has powerful logging capabilities, including screenshots, videos, and built-in features called Playwright Inspector and Traces for a detailed view of post-execution. These features are demonstrated with live demos throughout the course.
In conclusion, this course is a one-stop shop for you to become a Playwright hero and take charge of modern, full end-to-end test automation.
Note : We are using JavaScript language binding to build Playwright Automation tests. (Js is mainly picked language for Playwright)
For Beginners, there is 3 hours Javascript video in the last section of this course which covers all JS basics from Scratch including coding Assignments and quizzes which prepares candidates for Interviews.
Course Structure Breakdown:
Playwright Web/UI Automation (50%) - Master core Playwright concepts for comprehensive UI automation.
Mixed Web & API Testing with Network Mocking (25%) - Expand your skills by combining UI and API testing with network mocking capabilities.
Playwright Advanced Framework Features (25%) - Dive deep into advanced Playwright frameworks for optimal test design.
Optional: JavaScript Basics for Beginners (3 hrs) - Build a solid JavaScript foundation for confident Playwright exploration.
Become a Playwright hero and embrace the future of end-to-end test automation. Enroll today!