Testing a web application with Playwright
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.