Laminar has a native integration with Playwright for both JavaScript and Python. You simply need to initialize Laminar with your project API key and Playwright will be traced automatically.
We will hook into the API to create OpenTelemetry spans, but more importantly, we record browser session recordings.
Copy
import { Laminar } from '@lmnr-ai/lmnr';import { chromium } from 'playwright';Laminar.initialize({ projectApiKey: process.env.LMNR_API_KEY, instrumentModules: { playwright: { chromium } }});// The rest of your playwright code