Загрузка...

Playwright: More Than Just Automated Tests 🇬🇧

## Playwright: More Than Just Automated Tests

In this video, I show how **Playwright can be used for much more than end-to-end testing**.

The example uses a small application I built: a **TOTP client**, created as a **proof of concept (POC)** to study how temporary authentication codes work.

Since this is only a POC, it does not yet cover all production scenarios.
And this is exactly where **Playwright becomes an extremely powerful tool in a developer’s toolkit.**

Instead of modifying the front-end application code, I intercept API requests directly in the browser using **Playwright’s `page.route()` method**, and manipulate the response with **`route.fulfill()`**.

This allows me to simulate real-world situations such as:

* empty API responses (`empty`)
* large datasets, like **2000 items** (`manyItems`)
* **network delays**, for example 4 seconds (`delayed`)
* or the **normal flow**, with no interception (`normal`)

I also use **`page.pause()`** after navigating to the application.
This opens the **Playwright Inspector**, freezing execution and allowing guided debugging.

With this approach I can:

* inspect the UI at the exact state of each scenario
* validate intercepted requests
* manually test interactions before automating them
* analyze loading behavior and visual responses more precisely

In practice, **Playwright is not only a testing tool**.
It can also be used for **exploration, simulation of real environments, and advanced debugging**.

The main advantage of this approach is scalability:
when new scenarios appear, I simply add a new handler to the utility and connect it to the scenario switch.

The result is **more confidence, less guesswork, and applications that are better prepared for real-world conditions.**

For me, **Playwright is not optional — it is part of the modern development toolkit.**

---

### Repository

Source code for this example:
[https://github.com/newthiagoassisk8/TOTP-request-controller](https://github.com/newthiagoassisk8/TOTP-request-controller)

Видео Playwright: More Than Just Automated Tests 🇬🇧 канала Thiago Assis
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять