
Explore Playwright, a Microsoft browser automation framework that controls Chrome, Firefox, and Safari, offering reliable and efficient, cross-browser APIs for modern web applications.
Set up your testing environment by installing Node.js and npm, then install Playwright and its browser binaries, create a new Node project, and prepare to run your first tests.
Launch isolated browser instances with Playwright and manage separate cookies, local storage, and sessions using contexts. Navigate pages and handle frames or iframes to automate interactions across multiple contexts.
Master selectors in Playwright using CSS, XPath, and custom selectors to identify elements for clicking, typing, or reading text.
In this clip, we are going to see how to validate the behavior of the subject under test with Playwright.
Hooks are important functions that enable you to run scripts before or after your actual script.
Explore how playwright navigates and interacts with websites by launching a browser, opening pages, and automating actions such as clicking, typing, and selecting options, including chromium, firefox, or webkit.
Automate website authentication with Playwright and JavaScript by testing sign-in via a login popup, using environment variables for credentials, and validating success with button text and a screenshot.
Refactor tests with Playwright Test by installing playwright/test, organizing with test.describe and test, moving files into a tests folder, renaming to .spec.js, and running npx playwright test.
Create a Playwright and JavaScript test that authenticates, buys a product from the shop, adds to cart, proceeds to checkout, fills address details, and verifies the order has been placed.
In this clip, we will see how to make Playwright to run in non-headless mode, to see the browser performing the actions.
Learn how to add an HTML report showing the tests that were run with Playwright.
Learn how to automatically generate code by recording your actions in the browser.
Learn how to handle Playwright fixtures in your end to end front end tests.
Learn how to check radio and checkboxes with Playwright.
Find out how to run different command together with your tests through a global configuration file.
In this video, we learn how to manage multiple elements at once, and how to avoid getting exceptions when using too generic locators.
What is the best way to add text on a text field? Let's breakdown the two available methods: fill() and type().
Learn how to mimic the mouse hover action, drag and drop or press a specific key from the keyboard.
Assertions are a vast topic, so let's revisit it and try to cover what we are missing!
In this clip, let's check how to handle dialogs using Playwright!
Monitoring for different events is crucial for end to end testing. In this clip, let's learn how to check for console errors in our web app.
Find out how to read, add and remove cookies using Playwright!
In this clip, you will learn how to manage local and session storage using Playwright.
Let's learn how to download or upload files in our Playwright tests!
A real failing test from the demo shop, read line by line: the assertion, expected versus
received, and the call log that tells you whether the locator or the value is wrong.
Run the failing test in UI mode, step through every action with before and after snapshots,
use the locator picker and watch mode, and fix the bug without a single sleep.
trace: on-first-retry, show-trace, and the real trace of our failing test: actions, snapshots,
the network tab and the console.
--debug, step over, page.pause(), the locator playground, the VS Code extension and
DEBUG=pw:api.
What only-on-failure, retain-on-failure and on-first-retry really produce, uploading artifacts
with if: always(), attaching your own data, and choosing reporters.
--repeat-each, the flaky label, getting a trace of a failure, the four kinds of flake, and
verifying the fix (7 of 20 runs failed on the real demo).
The race between a test and the app, why hard waits are always wrong (8 of 20 real runs
failed), and how auto-waiting removes the race.
getByRole, labels, test IDs and CSS, tested against three ordinary redesigns.
The real strict mode violation, filter({ hasText }), chaining, has:, and why nth() quietly
tests the wrong thing.
Why expect(locator).toHaveText retries and expect(await locator.textContent()) doesn't, the
assertions to use, timeouts and soft assertions.
waitForResponse, expect.poll, toPass, waitForEvent, and why networkidle is discouraged.
Four fixes, each measured over 50 real runs: three good practices that barely moved the numbers,
and the real cause. Plus type() → fill() / pressSequentially().
One renamed label, thirty failing tests, nine files to edit, and what a page object changes.
The demo's LoginPage, step by step: locators as fields, actions named after intent, and no
assertions hidden inside actions.
A ProductCard component scoped to a root locator, reused across pages, and how to avoid the
god object.
test.extend, setup and teardown around use(), lazy fixtures, a per-test product created
through the API, and worker scope.
A real parallel collision from the course's own demo, the three data rules, baseURL,
environment variables, and keeping saved sessions out of git.
Folders by feature, names that explain failures, tags and --grep, what to run on pull requests
versus nightly, test.fixme and test.slow.
In February 2024, a new testing framework based on Playwright has been released by Netflix. In this clip, we will see the main capabilities of this framework.
Explore how SafeTest with Jest unit tests a single React component by rendering a simple footer and asserting its text and non-null page object.
Compare SafeTest and Cypress: SafeTest offers component, end-to-end, and visual tests in one library with simple setup, backed by Netflix, unlike Cypress.
In this video, we push our code to GitHub and we create a GitHub action workflow to run the tests automatically.
Here is the URL for the GitHub repo: https://github.com/LaurentiuGabriel/playwright-demo.
In this clip, we learn how to dockerize our project and run our tests through Docker.
Learn how to integrate Artillery to run non function tests against your web app.
Mastering Modern Web Automation: A Beginner's Guide to Playwright
In today's rapidly evolving digital landscape, efficient web automation is not just a luxury but an essential skill for many professionals. Dive deep into the intricate world of Playwright, a groundbreaking browser automation tool birthed by the experts at Microsoft. This course is not just about learning a tool; it's about understanding the transformative potential of efficient automation in the modern web era.
In this course you will learn how to:
Use Playwright to automate complex flows, like buying an item from an online shop.
Use GitHub Actions to develop CI/CD pipelines and run your tests automatically.
Leverage AI with Playwright to develop tests by just describing them in plain English.
Make use of the automatic code generation tool with Playwright.
Perform visual tests using the GPT-4 language model.
Moreover, real-world scenarios are interwoven throughout the curriculum, ensuring you're not just learning, but also understanding the broader implications and applications of your knowledge. Designed to cater to a diverse audience — be it developers, QA professionals, innovative product managers, or forward-thinking educators — this course is comprehensive in its approach.
Benefit from expert insights, tips, and tricks that draw from extensive industry experience and best practices. With many different frameworks and technologies described in detail, this course promises more than just learning; it's a journey into the future of web automation. Join us, and together, let's set the gold standard in mastering web automation with Playwright.