Playwright has become the leading end-to-end testing tool. Its vocabulary — locators, fixtures, traces, POM — is essential for QA engineers and developers writing automated browser tests.
0 / 5 completed
1 / 5
A QA engineer says: 'Use a locator instead of a CSS selector — it's more resilient.' What is a Playwright locator?
A Playwright locator is a lazy reference to an element that auto-waits for the element to be available before interacting. page.getByRole('button', { name: 'Submit' }) is more resilient than page.locator('.btn-submit') because it matches by semantics (ARIA role and accessible name) rather than fragile CSS classes. In discussions: 'use a locator' means move away from brittle selectors toward stable, accessible queries.
2 / 5
A developer says: 'Extract the login steps into a fixture.' What is a Playwright fixture?
Playwright fixtures are a dependency injection mechanism for tests. You define shared setup (like authenticating a user) once in a fixture and inject it into any test: test('dashboard', async ({ authenticatedPage }) => { ... }). Fixtures handle setup and teardown automatically. In discussions: 'extract to a fixture' means avoid repeating the same setup code in multiple tests.
3 / 5
A test report shows a trace file. What is a Playwright trace?
A Playwright trace is a comprehensive recording of a test run, captured with trace: 'on' in the config. It includes screenshots per action, DOM snapshots, network requests, console messages, and an interactive timeline. When a test fails in CI, you download the trace and open it in Playwright's trace viewer for full debugging context. In discussions: 'check the trace' means analyse the recorded test run rather than running it again locally.
4 / 5
A developer says: 'Use the Page Object Model to abstract the checkout flow.' What is POM in testing?
The Page Object Model (POM) is a design pattern where each page (or component) has a corresponding class that encapsulates its interactions: class CheckoutPage { fillAddress(data) {...} submit() {...} }. Tests use the class methods rather than raw locators. This makes tests more readable and maintainable — when the UI changes, you update the page object, not every test. In reviews: 'use POM' means extract page interactions into reusable abstractions.
5 / 5
A developer says: 'Run the tests in parallel across multiple workers.' What does this mean in Playwright?
Playwright can run test files concurrently across multiple workers (OS processes). With workers: 4 in the config, 4 test files run simultaneously. This dramatically reduces total test time. Tests within a file still run sequentially by default. In CI discussions: 'run tests in parallel' means configure multiple workers to speed up the test suite. 'Tests interfering with each other' is a warning that parallel tests are sharing state they shouldn't.