lecture 1 of 170 completed

The execution model, and what it buys you

Out-of-process control plus a worker model explains Playwright's speed, its isolation, and the failures that only appear in parallel.

What you'll learn

  • Why out-of-process control buys freedom
  • What the worker model explains about parallel failures
  • Why each test gets a fresh context rather than a fresh browser

Most Playwright problems at senior level are not API problems. They are consequences of the execution model that nobody explained. So start here.

Playwright drives the browser from outside it. Your test code runs in Node.js. The browser runs as a separate process. Commands travel between them over a WebSocket connection using the Chrome DevTools Protocol or an equivalent.

That distance is the opposite of Cypress's choice, and it buys specific things.

No same-origin restriction. Your test is not page code, so the browser's page-level security rules do not apply to it. Cross-origin navigation is unremarkable. SSO redirects just work.

full course

Keep reading with the full course

The Foundations track and the first lessons in each framework are free. This lesson needs full course access. A course plan includes all lessons for Playwright, Cypress and Selenium.

See course plans →