Testing a web application with Playwright

Filed under: Java, Playwright, Test automation, — Tags: JUnit, Playwright, Test automation, Web testing — Thomas Sundberg — 2026-03-01

Testing web applications can be painful. Browsers are slow, tests are flaky, and setting up the right driver version is a chore. Playwright is a browser automation library from Microsoft that takes away some of that pain. It manages browser downloads for you, waits for elements automatically, and comes with built-in assertions that make your tests more reliable.

In this post, we will build a small web application that lists products and then write two tests for it using Playwright for Java. You will need basic Java knowledge to follow along. All the code you need is included.

(more...)

Pages

About
Events
Why

Categories

AI
Agile
Automation
BDD
Clean code
Continuous deployment
Continuous integration
Cucumber
Culture
Design
DevOps
Executable specification
Git
Gradle
Guice
J2EE
JUnit
Java
Kubernetes
Linux
Load testing
Maven
Mockito
New developers
Pair programming
PicoContainer
Playwright
Presentation
Programming
Public speaking
Quality
Recruiting
Requirements
Scala
Selenium
Software craftsmanship
Software development
Spring
TDD
Teaching
Technical debt
Test automation
Tools
Web
Windows
eXtreme Programming

Authors

Thomas Sundberg
Adrian Bolboaca

Archives

Meta

rss RSS