◄ home

debug Playwright driver

November 6, 2024
We may encounter the following errors when running Playwright tests:
If the error can be reproduce locally but no obvious issues can be identified, you can follow this article to debug the InjectedScript in the browser that drives by Playwright.
The main working principle of Playwright is to inject JavaScript code into the browser, communicate with the Node layer (test code + Playwright server driver) to drive the browser, and simulate user behavior.

We can debug the server side code like debugging a normal Node process. For the injected code in the browser, please follow the following steps:

Endh2

cd ~