Sitemap

Member-only story

Playwright with copy-prompt feature to quickly fix error

Since Playwright version v1.51.0, we can copy auto-generated prompt directly from Playwright and use it in a LLM app to quickly fix or investigate Playwright error. In this article, let’s see how we can do it.

Donald Le
2 min readMar 24, 2025

--

Photo by Giuliano Gabella on Unsplash

First, let’s install Playwright and create a new project in your desktop.

npm init playwright@latest new-project

Open the new-project in your favorite IDE and change the has-title test in line 7 from Playwright to Playwrights .

Run the example test with Chromium browser

npx playwright test --project chromium

The html-report will be automatically opened as below.

Here you click on copy prompt to copy the auto-generated prompt content and paste it your the LLM of your choice (for example like DeepSeek).

--

--

Donald Le
Donald Le

Written by Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

No responses yet