🧪Playwright
Also known as Playwright Test, Microsoft Playwright
A tool that drives a real browser from code, to test a site like a user.
Think of it like
Think of it like a robot at the keyboard. It uses your website for you.
Example
Jack's Playwright test opens his sign-up page in three browsers, fills the form and checks the welcome message. It catches a bug that only Safari had.
Why it matters
It tests the site the way people use it, in the browsers they really use.
Definition
Example code
javascript
await page.goto('https://example.com');
await expect(page).toHaveTitle('Example Domain');Common mistake
Key takeaways
- 1A real browser. Driven from code.
- 2Three engines. Chromium, Firefox, WebKit.
- 3Waits on its own. Fewer flaky tests.