1
Fundamentals
What is Playwright, and what is it used for?
Playwright is an open-source end-to-end testing / browser-automation framework from Microsoft. It drives a *real* browser to act like a user — navigating, clicking, typing — and asserts the app behaves correctly.
It supports multiple browsers and languages (JS/TS, Python, Java, .NET), with auto-waiting, parallel execution, and tracing built in.
``
It supports multiple browsers and languages (JS/TS, Python, Java, .NET), with auto-waiting, parallel execution, and tracing built in.
``
ts
import { test, expect } from '@playwright/test';
test('home page loads', async ({ page }) => {
await page.goto('https://example.com');
await expect(page.getByRole('heading')).toBeVisible();
});
``💡 Plain English: A tireless robot user that follows your script exactly — clicking buttons and filling forms across browsers — and shouts the moment anything looks wrong. Far faster and steadier than a human clicking by hand.