Web Development · WDC-115

Playwright End-to-End Test Automation

Playwright End-to-End Test Automation is a course in writing automated web tests from scratch, covering assertions, locators, proper waiting, forms and logins, page objects, fixtures, API testing, Trace Viewer and running tests in CI/CD. It suits web developers, QA staff and testers starting test automation, and small teams that want a test suite they can trust.

Updated
From 6,750 THB / person 7,500 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration12 hours · 2 days
  • FormatOnsite / live online
  • Next round8–9 Dec 26
  • CertificateIncluded

Course overview

Testing a web application by hand before every release burns an enormous amount of team time, and the bigger the system gets the less of it actually gets covered. The bugs users hit are usually in the paths nobody re-clicked. Playwright is Microsoft open-source automation tool that drives Chromium, Firefox and WebKit from a single codebase, with built-in auto-waiting that removes most of the mysterious flaky failures older tools were known for. This course takes

learners from zero to a working automated test suite: installation and project structure, writing tests and assertions, choosing locators that survive UI changes, handling forms and file uploads, reusing a saved login state, organizing code with the page object pattern, testing APIs alongside the UI, capturing screenshots, video and traces on failure, and finally running the whole suite automatically in CI/CD on every code change. (2 days, 6 hours per day, 12 hours in total, Beginner to Intermediate level.)

What you’ll gain

  • Understand test automation and decide what is worth automating
  • Install Playwright and set up a test project the whole team can share
  • Write tests and assertions that verify what the business actually cares about
  • Choose locators that do not break when the UI changes
  • Handle waiting correctly so tests do not fail at random
  • Test forms, file uploads and logins that many tests depend on
  • Organize the suite with page objects and fixtures so it stays maintainable
  • Test APIs alongside the UI to seed data and verify results
  • Run the suite in CI/CD and read reports with screenshots and video on failure

Who this course is for

  • Web developers who want to cut the repeated manual testing before each release
  • QA engineers and software testers starting with test automation
  • Teams on older test tools who keep hitting unexplained flaky failures
  • DevOps engineers who want tests wired into the CI/CD pipeline
  • Small teams with no full-time QA who still want a test suite they can trust

Prerequisites

  • Basic understanding of how the web works and of HTML structure
  • Reasonable JavaScript or TypeScript skills (class examples use TypeScript)
  • Comfortable with the command line and installing tools on your own machine
  • Some Git experience makes the CI/CD section run more smoothly

Curriculum

Course Details

A 2-day course, 6 hours per day (12 hours in total), delivered as lectures with hands-on labs in every section. Beginner to Intermediate level. We provide a practice web application with forms, login, file upload and data tables so learners can cover every situation. Learners take home a lab guide, complete sample test code for every lab, and a working CI configuration. Playwright is open source and can be used in the organization at no licensing cost.

Day 1 Playwright Fundamentals and Writing Tests

Section 1: Test Automation Concepts

  • The cost of manual testing and the hidden cost as the system grows
  • Levels of testing: unit, integration and end-to-end, and what each is for
  • Deciding what belongs in automation and what should stay manual
  • What sets Playwright apart from earlier generations of test tools

Section 2: Installation and Project Structure

  • Installing Playwright and all three browsers in a single command
  • Test project structure and the configuration file you need to know
  • Running tests headed, headless and in UI mode
  • Lab: install Playwright and get the sample tests passing on all browsers

Section 3: Writing Tests and Assertions

  • Test file structure and grouping tests so they read clearly
  • Driving the browser: navigating, clicking, typing, selecting and scrolling
  • Writing assertions for text, state and elements on the page
  • Lab: write your first end-to-end test against the practice application

Section 4: Locators and Selecting Elements

  • Choosing locators that survive future UI changes
  • Selecting by text, role and label instead of depending on HTML structure
  • Handling repeated lists, tables and deeply nested elements
  • Lab: rework the locators in an existing test so a layout change no longer breaks it

Section 5: Waiting and Flaky Tests

  • Playwright auto-waiting and why you should not add fixed delays
  • Waiting for specific conditions: data loading, navigation and API calls
  • Why a test passes sometimes and fails others, and how to trace the cause systematically
  • Lab: fix an intermittently failing test so it passes reliably every run
Day 2 Structure, APIs and CI/CD

Section 6: Forms, Files and Login

  • Filling every kind of form control: text fields, selects and date pickers
  • Uploading and downloading files and verifying the result
  • Saving login state so tests do not have to log in again every time
  • Lab: write tests that log in once and reuse that state everywhere else

Section 7: Page Objects and Code Organization

  • The page object pattern and separating UI detail from test logic
  • Using fixtures to prepare the environment and data before a test runs
  • Separating test data from code so one test can run against many data sets
  • Lab: refactor your tests into maintainable page objects

Section 8: Testing APIs Alongside the UI

  • Calling APIs directly from Playwright to seed data before a UI test
  • Verifying backend results after acting through the interface
  • Intercepting and mocking API responses to test hard-to-produce cases
  • Lab: write a test that seeds data over the API then verifies it in the UI

Section 9: Reporting and Debugging

  • Reading the test report and seeing exactly which step failed
  • Capturing screenshots, video and traces automatically on failure
  • Using Trace Viewer to replay every step of a failed test
  • Using Codegen to draft tests, and what to watch out for in the generated code

Section 10: Running in CI/CD

  • Running the suite automatically on every code change or pull request
  • Running tests in parallel and sharding across machines for speed
  • Handling secrets and configuration across dev and staging environments
  • Lab: configure the suite to run automatically in CI and publish its report

Section 11: Capstone and Real-World Use

  • Capstone: build a suite covering the critical paths of one web application end to end
  • Deciding which paths are worth automating first
  • Keeping the suite from becoming a maintenance burden over time
  • Workshop: present your suite and review its structure together

Schedule & training options

For individuals — public rounds

8–9December
Classroom8–9 Dec 26
20 seats left
23–24February
Classroom23–24 Feb 27
20 seats left
20–21April
Classroom20–21 Apr 27
20 seats left
5–6May
Classroom5–6 May 27
20 seats left
26–27July
Classroom26–27 Jul 27
20 seats left
1–2September
Classroom1–2 Sep 27
20 seats left
16–17November
Classroom16–17 Nov 27
20 seats left

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

How should you choose Playwright locators so tests do not break easily?

Locate elements by what users see, such as getByRole with the button name, getByLabel for form fields or getByText, rather than CSS selectors or XPath tied to an HTML structure that changes often. If an element cannot be found by text or role, add a data-testid attribute and use getByTestId, and use filter when picking from repeated items in a list.

Why do end-to-end tests pass sometimes and fail other times, and how do you fix them?

The usual cause is timing, such as checking a result before data has loaded, or several tests sharing the same data. Playwright auto-waits for elements to be ready before clicking or typing, and web-first assertions such as toBeVisible retry until they pass or time out, so avoid fixed delays with waitForTimeout. Give each test its own data, and use Trace Viewer to see exactly which step failed.

How do you stop Playwright tests having to log in every time?

Create a setup project that logs in once and saves cookies and local storage to a file with storageState. Then, in playwright.config, make the other test projects depend on setup and use that storageState file by default. Every test starts already logged in and the suite runs much faster. Keep the state file out of Git, as it contains login data. This course practises it in the forms and login section.

Who is the Playwright End-to-End Test Automation course for, and what should I know beforehand?

It suits web developers who want to cut repetitive testing before each release, QA staff and testers starting test automation, teams struggling with tests that fail for no clear reason, and small teams without a full-time tester. You should understand how the web and HTML work, write reasonable JavaScript or TypeScript, as class examples use TypeScript, and install tools from the command line.

What will I be able to do after the Playwright End-to-End Test Automation course?

You will be able to install Playwright and write tests with assertions that run in every browser, choose locators that survive UI changes, fix flaky tests, test forms, file uploads and logins, organise code with page objects and fixtures, combine API and UI testing, investigate failures with Trace Viewer and run the suite automatically in CI/CD. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

Can the Playwright End-to-End Test Automation course be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your own work, such as building tests for the key user journeys of the web application your team looks after. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.