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.
2 min readMar 24, 2025
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).