Automation of functional testing of web applications using Playwright and TypeScript

During the workshop, participants will gain practical skills in automating E2E tests with Playwright and TypeScript. Together, we will build a test environment from scratch, write sets of stable tests, and discuss techniques for working with locators, API mocking, test isolation, and environment control. Special emphasis will be placed on creating tests that follow design patterns and building a POM architecture that scales with the project. After the training, participants will be able to prepare a complete test automation process, integrate it with CI/CD, and effectively detect regressions in web applications of various scales.

Training program

Project Setup and Configuration

  1. Preparing the development environment
  2. Creating a project based on Node.js/TypeScript
  3. Overview of `package.json` and available configuration options

TypeScript — Refresher

  1. Variables, data types, and scope
  2. Loops and conditional statements
  3. Functions and objects
  4. Asynchronous programming, Promises, and Async/Await
  5. Functional vs object-oriented programming
  6. Complex types, interfaces, and type guards
  7. Enumerations
  8. Generic types

Introduction to Playwright

  1. Overview of the Playwright framework
  2. Installation and configuration
  3. First run
  4. Locators vs selectors
  5. Actions — interacting with webpage elements
  6. Handling navigation, iframes, and popups
  7. Test structure
  8. Assertions — validating page content and expected results
  9. Running test suites and creating custom configurations

Playwright — Advanced Features

  1. Page Object Model
  2. Visual assertions
  3. Generating screenshots and video recordings
  4. Debugging tests in UI mode
  5. Report generation
  6. Simulating keyboard interactions
  7. Multi-browser support
  8. File upload and download handling
  9. API mocking
  10. Session management and browser authentication

Tools and Best Practices

  1. Organizing test code
  2. Defining environments and global variables
  3. Automating code quality checks

Summary

  1. Q&A session
  2. Best practices recap
  3. Next steps for learning Playwright