Posts

Showing posts with the label playwright

Guide to Setting Up Playwright E2E Testing in NextJS

Image
Introduction Playwright is a powerful automated testing framework developed by Microsoft, allowing for End-to-End (E2E) testing across modern browsers such as Chromium, Firefox, and WebKit. Key advantages include fast execution speed due to its event-driven architecture, auto-wait capabilities that reduce "flaky" errors, default support for parallel execution, and the Codegen tool which helps generate automated test scripts by recording user interactions. Prerequisites This article is a continuation of my previous posts, so I will not provide the test code files again; please review them to have the source code ready before proceeding. Detail First, if your project does not have Playwright yet, you can set it up quickly as follows; this command will install the necessary packages and create a config file along with demo test files: yarn create playwright Or install the following packages manually: yarn add -D @playwright/test yarn playwright install Update playwright.c...