SoftwareTestPilot
300 Playwright Q&A

300 Playwright Interview Questions & Answers (2026) — Land Your SDET Role

A definitive bank of 300 real Playwright interview questions with senior-level answers. Covers fundamentals, locators, assertions, fixtures, API testing, network mocking, authentication, debugging, tracing, CI/CD, Docker, and framework design — for freshers through SDET architects.

  • 62 min read
  • Difficulty: Mixed (Easy → Hard)
  • Freshers → 10+ yrs
  • Updated June 2026
  • Avinash Kamble
Benchmarks

Playwright market & performance benchmarks (2026)

Numbers you can quote in interviews, blog posts, and RFPs. Sources: QA Jobs Radar live feed (Jan–Jun 2026), Playwright 1.48 test-runner telemetry against a 500-test suite on GitHub Actions (ubuntu-latest, 4 vCPU), and a Selenium 4 baseline on the same suite.

MetricPlaywright 1.48Selenium 4.x baselineDelta
500-test suite runtime (serial)~11 min 20 s~26 min 05 s2.3× faster
500-test suite runtime (4 workers, parallel)~3 min 40 s~9 min 15 s2.5× faster
Median flake rate (auto-wait vs explicit wait)0.8%3.6%4.5× lower
Cold browser launch (Chromium)~420 ms~980 ms2.3× faster
Trace file size (1 failing test)~1.4 MBN/A (needs 3rd-party)Built-in
CI minutes saved / 100 runs~1,470 min~24 hrs / week
Market signal (Jun 2026)IndiaUnited StatesGlobal
Open SDET roles requiring Playwright1,5601,4103,940+
Median SDET salary (Playwright primary, 3–5 YOE)₹18.2 LPA$132,000
Median SDET salary (Playwright primary, 5–8 YOE)₹28.6 LPA$156,500
% postings asking for TypeScript + Playwright64%77%71%
% postings asking for Playwright + API testing in same suite41%52%47%
% postings requiring CI (GitHub Actions / GitLab) fluency82%88%85%

Swipe horizontally to see all columns →

Read

Playwright is measurably ~2.3–2.5× faster and ~4.5× less flaky than a matched Selenium 4 suite on identical hardware — and 2026 Playwright postings pay a ~15–20% premium over Selenium-primary SDET roles at the same YOE. If you’re prepping past 3 YOE, own TypeScript + API testing + CI, not just locators.

0 / 373 reviewed
0%

1. Fresher (0–1 yrs)

Easy Very Common 1 minQ1 / 373

Q1.What is Playwright?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "Playwright" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Playwright is an open-source test automation library built by Microsoft. It drives Chromium, Firefox, and WebKit via the DevTools Protocol, supports TypeScript, JavaScript, Python, Java, and .NET, and is the 2026 default for greenfield web testing projects.

Tips to remember
  • Open with a one-sentence definition of Playwright, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
RelatedQ3
Medium Very Common 1 minQ2 / 373

Q2.How is Playwright different from Selenium?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on How is Playwright different from Selenium and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation
DimensionPlaywrightSelenium
Auto-waitNativeManual (explicit waits)
LanguagesTS, JS, Python, Java, .NETJava, C#, Python, Ruby, JS
Multi-tabYesYes
Browser installnpx playwright installManual driver management
SpeedFastestSlower

See our Selenium Q&A bank for the other side.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on How is Playwright different from Selenium over textbook wording.
  • Be ready to whiteboard the How is Playwright different from Selenium snippet live — panels often ask you to type it, not describe it.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Medium Very Common 1 minQ3 / 373

Q3.How do you install Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you install Playwright" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
npm init -y
npm install -D @playwright/test
npx playwright install --with-deps chromium firefox webkit
Tips to remember
  • Walk through install Playwright as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the install Playwright snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ4 / 373

Q4.What is `page` in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "`page`" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

page is a fixture provided by @playwright/test representing a single browser tab. Every test gets a fresh page by default — perfect isolation with no manual setup.

Tips to remember
  • Open with a one-sentence definition of `page`, then a concrete Playwright example — never start with history or theory.
  • Be ready to whiteboard the `page` snippet live — panels often ask you to type it, not describe it.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Medium Very Common 1 minQ5 / 373

Q5.What is a `locator`?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "`locator`" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A locator is a query for an element that re-evaluates every time it's used. Unlike Selenium's findElement, locators are lazy and stable.

await page.getByTestId('submit').click();
Tips to remember
  • Open with a one-sentence definition of `locator`, then a concrete Playwright example — never start with history or theory.
  • Be ready to whiteboard the `locator` snippet live — panels often ask you to type it, not describe it.
  • Say how you clean up or roll back the data you touch — DB questions are really data-hygiene questions.
Medium Very Common 1 minQ6 / 373

Q6.Name five Playwright locator strategies.

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Listing questions on Name five Playwright locator strategies look easy but trap candidates who rattle off names without depth. Interviewers score higher when you group the items, mention which you use most, and add one line of context per item.

Detailed explanation
  1. page.getByRole('button', { name: 'Submit' }) — best, accessibility-first.
  2. page.getByTestId('submit') — explicit test ID.
  3. page.getByLabel('Email') — accessible labels.
  4. page.getByText('Welcome') — text content.
  5. page.locator('.btn-primary') — CSS fallback.
Tips to remember
  • Group the items into 2–3 categories before listing — panels remember structure, not raw counts.
  • Be ready to whiteboard the Name five Playwright locator strategies snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ7 / 373

Q7.What is auto-wait?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "auto-wait" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Playwright waits for elements to be visible, stable, receiving events, and enabled before acting. You almost never need sleep or waitForElement — kills 80% of the flakiness you see in Selenium suites.

Tips to remember
  • Open with a one-sentence definition of auto-wait, then a concrete Playwright example — never start with history or theory.
  • Be ready to whiteboard the auto-wait snippet live — panels often ask you to type it, not describe it.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Medium Very Common 1 minQ8 / 373

Q8.How do you write assertions in Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you write assertions" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
import { expect } from '@playwright/test';

await expect(page).toHaveURL(/\/dashboard$/);
await expect(page.getByRole('heading')).toContainText('Welcome');
await expect(page.getByTestId('cart')).toHaveText('3');

All expect calls are auto-retrying — they keep polling until the assertion passes or times out.

Tips to remember
  • Walk through write assertions as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the write assertions snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ9 / 373

Q9.What is the Trace Viewer?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "Trace Viewer" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

The Trace Viewer is a standalone HTML tool that shows DOM snapshots, network calls, console logs, and a timeline for every step of a test. The fastest way to debug a failure. Enable with trace: 'on-first-retry' in playwright.config.ts.

Tips to remember
  • Open with a one-sentence definition of Trace Viewer, then a concrete Playwright example — never start with history or theory.
  • Be ready to whiteboard the Trace Viewer snippet live — panels often ask you to type it, not describe it.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Medium Very Common 1 minQ10 / 373

Q10.How do you run tests in parallel?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you run tests in parallel" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

@playwright/test runs tests in parallel by default. For CI, shard across machines with --shard=N/M and merge the JSON/HTML results.

Tips to remember
  • Walk through run tests in parallel as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the run tests in parallel snippet live — panels often ask you to type it, not describe it.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Very Common 1 minQ11 / 373

Q11.What is the Page Object Model?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "Page Object Model" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

POM is a design pattern where each page is a class with locators as properties and actions as methods. See our Playwright POM TypeScript guide for the full pattern.

Tips to remember
  • Open with a one-sentence definition of Page Object Model, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Page Object Model cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Medium Very Common 1 minQ12 / 373

Q12.How do you handle iframes?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you handle iframes" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
const frame = page.frameLocator('#payment-iframe');
await frame.getByRole('button', { name: 'Pay' }).click();
Tips to remember
  • Walk through handle iframes as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the handle iframes snippet live — panels often ask you to type it, not describe it.
  • Finish by saying you always return to the default content after frame work — forgetting that is the classic failure this question hunts for.
Medium Very Common 1 minQ13 / 373

Q13.How do you handle multiple tabs?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you handle multiple tabs" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
const [newPage] = await Promise.all([
  context.waitForEvent('page'),
  page.getByTestId('open-new-tab').click(),
]);
await newPage.getByRole('heading').waitFor();
Tips to remember
  • Walk through handle multiple tabs as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the handle multiple tabs snippet live — panels often ask you to type it, not describe it.
  • Explain how you test asynchronous flows (polling, consumer assertions, timeouts) rather than treating it as a sync call.
Medium Very Common 1 minQ14 / 373

Q14.How do you intercept network calls?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you intercept network calls" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
await page.route('**/api/users', route => route.fulfill({
  status: 200,
  body: JSON.stringify([{ id: 1, name: 'Test User' }]),
}));
Tips to remember
  • Walk through intercept network calls as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the intercept network calls snippet live — panels often ask you to type it, not describe it.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Very Common 1 minQ15 / 373

Q15.What is the `request` fixture?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "`request` fixture" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

It lets you test APIs in the same runner as UI tests — handy for setup/teardown via API and for pure API tests. See our API Testing Q&A for deeper patterns.

Tips to remember
  • Open with a one-sentence definition of `request` fixture, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise `request` fixture cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Medium Very Common 1 minQ16 / 373

Q16.How do you take a screenshot on failure?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you take a screenshot on failure" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Add to playwright.config.ts:

use: { screenshot: 'only-on-failure' }
Tips to remember
  • Walk through take a screenshot on failure as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the take a screenshot on failure snippet live — panels often ask you to type it, not describe it.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Medium Very Common 1 minQ17 / 373

Q17.How do you record a video?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you record a video" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
use: { video: 'retain-on-failure' }
Tips to remember
  • Walk through record a video as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the record a video snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ18 / 373

Q18.How do you mock a date?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you mock a date" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
await page.clock.install({ time: new Date('2026-06-27') });
Tips to remember
  • Walk through mock a date as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the mock a date snippet live — panels often ask you to type it, not describe it.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Very Common 1 minQ19 / 373

Q19.What is `playwright.config.ts`?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "`playwright.config.ts`" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

The main config file where you set base URL, browsers, reporters, retries, timeouts, and parallelism. Treated as the single source of truth for the whole suite.

Tips to remember
  • Open with a one-sentence definition of `playwright.config.ts`, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise `playwright.config.ts` cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Medium Very Common 1 minQ20 / 373

Q20.How do you run a single test?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you run a single test" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
npx playwright test login.spec.ts --headed
Tips to remember
  • Walk through run a single test as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the run a single test snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ21 / 373

Q21.What is `--grep`?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "`--grep`" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Filters tests by name or tag:

npx playwright test --grep "@smoke"
Tips to remember
  • Open with a one-sentence definition of `--grep`, then a concrete Playwright example — never start with history or theory.
  • Be ready to whiteboard the `--grep` snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ22 / 373

Q22.How do you tag tests?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you tag tests" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
test('login flow', { tag: '@smoke' }, async ({ page }) => { /* ... */ });
Tips to remember
  • Walk through tag tests as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the tag tests snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ23 / 373

Q23.What is `test.beforeEach`?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "`test.beforeEach`" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A hook that runs before every test in the describe block. Use it for shared setup like login or navigating to a base URL.

Tips to remember
  • Open with a one-sentence definition of `test.beforeEach`, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise `test.beforeEach` cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Medium Very Common 1 minQ24 / 373

Q24.How do you handle authentication state?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you handle authentication state" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
test.use({ storageState: 'auth.json' });

Generate auth.json once in a global setup and reuse across tests to skip the login flow.

Tips to remember
  • Walk through handle authentication state as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the handle authentication state snippet live — panels often ask you to type it, not describe it.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Medium Very Common 1 minQ25 / 373

Q25.What is `page.evaluate()`?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "`page.evaluate()`" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Runs JavaScript in the browser context:

const token = await page.evaluate(() => localStorage.getItem('auth_token'));
Tips to remember
  • Open with a one-sentence definition of `page.evaluate()`, then a concrete Playwright example — never start with history or theory.
  • Be ready to whiteboard the `page.evaluate()` snippet live — panels often ask you to type it, not describe it.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Medium Very Common 1 minQ26 / 373

Q26.How do you test file uploads?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you test file uploads" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
await page.getByTestId('avatar').setInputFiles('avatar.png');
Tips to remember
  • Walk through test file uploads as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the test file uploads snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ27 / 373

Q27.How do you test downloads?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you test downloads" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
const download = await page.waitForEvent('download');
await download.saveAs('/tmp/report.pdf');
Tips to remember
  • Walk through test downloads as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the test downloads snippet live — panels often ask you to type it, not describe it.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Medium Very Common 1 minQ28 / 373

Q28.How do you test drag-and-drop?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you test drag-and-drop" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
await page.getByTestId('item').dragTo(page.getByTestId('dropzone'));
Tips to remember
  • Walk through test drag-and-drop as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the test drag-and-drop snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ29 / 373

Q29.How do you test responsive design?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you test responsive design" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
test.use({ viewport: { width: 375, height: 667 } });
Tips to remember
  • Walk through test responsive design as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the test responsive design snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ30 / 373

Q30.How do you integrate Playwright with CI/CD?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you integrate Playwright with CI/CD" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation
- run: npx playwright install --with-deps
- run: npx playwright test
- uses: actions/upload-artifact@v4
  if: ${{ !cancelled() }}
  with: { name: traces, path: test-results/ }

See our GitHub Actions CI guide for a deeper CI walkthrough.

Tips to remember
  • Walk through integrate Playwright with CI/CD as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the integrate Playwright with CI/CD snippet live — panels often ask you to type it, not describe it.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Medium Very Common 1 minQ31 / 373

Q31.Explain Playwright's auto-waiting mechanism and how it eliminates flaky UI tests.

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Open-ended "explain Playwright's auto-waiting mechanism and how it eliminates flaky UI tests" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

Before performing actions (`click()`, `fill()`), Playwright automatically verifies actionability preconditions: verifying the target element is attached to the DOM, visible, enabled, stable (not animating), and not obscured by modal overlays.

await page.locator('button#submit').click(); // Auto-waits for actionability
Tips to remember
  • Use a 3-part frame for Playwright's auto-waiting mechanism and how it eliminates flaky UI tests: what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the Playwright's auto-waiting mechanism and how it eliminates flaky UI tests snippet live — panels often ask you to type it, not describe it.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Medium Very Common 1 minQ32 / 373

Q32.Demonstrate how to write async web-first assertions using expect(locator).toBeVisible().

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Demonstrate how to write async web-first assertions using expect(locator).toBeVisible() and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Web-first assertions automatically poll and retry the assertion condition up to the configured timeout threshold until the DOM matches expectations.

await expect(page.locator('h1.status')).toHaveText('Order Confirmed', { timeout: 10000 });
Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Demonstrate how to write async web-first assertions using expect(locator).toBeVisible() over textbook wording.
  • Be ready to whiteboard the Demonstrate how to write async web-first assertions using expect(locator).toBeVisible() snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ33 / 373

Q33.What is a Browser Context in Playwright, and why is it superior to launching new browsers?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "Browser Context in Playwright, and why is it superior to launching new browsers" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A Browser Context (`browser.newContext()`) creates an isolated, incognito browser session sharing the single underlying Chromium process engine. Contexts spin up in ~10ms with isolated cookies and storage.

const adminContext = await browser.newContext();
const userContext = await browser.newContext();
Tips to remember
  • Open with a one-sentence definition of Browser Context in Playwright, and why is it superior to launching new browsers, then a concrete Playwright example — never start with history or theory.
  • Be ready to whiteboard the Browser Context in Playwright, and why is it superior to launching new browsers snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Very Common 1 minQ34 / 373

Q34.Demonstrate how to locate elements using user-facing attributes (getByRole, getByTestId).

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Demonstrate how to locate elements using user-facing attributes (getByRole, getByTestId) and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Playwright champions semantic accessibility locators (`getByRole`) and explicit test attributes (`getByTestId`) over brittle CSS/XPath chains.

await page.getByRole('button', { name: 'Checkout' }).click();
await page.getByTestId('sku-input').fill('ITEM-99');
Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Demonstrate how to locate elements using user-facing attributes (getByRole, getByTestId) over textbook wording.
  • Be ready to whiteboard the Demonstrate how to locate elements using user-facing attributes (getByRole, getByTestId) snippet live — panels often ask you to type it, not describe it.
  • Say explicitly that you prefer CSS/relative locators and only fall back to XPath for text or axes — panels grade locator hygiene here.
Medium Very Common 1 minQ35 / 373

Q35.How do you intercept, mock, and modify network requests using page.route()?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you intercept, mock, and modify network requests using page.route()" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

`page.route()` intercepts network calls matching URL patterns, enabling developers to fulfill requests with deterministic mock JSON bodies or simulate HTTP 500 outages.

await page.route('**/api/v1/cart', async route => {
  await route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ items: [] }) });
});
Tips to remember
  • Walk through intercept, mock, and modify network requests using page.route() as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the intercept, mock, and modify network requests using page.route() snippet live — panels often ask you to type it, not describe it.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Medium Very Common 1 minQ36 / 373

Q36.Demonstrate how to reuse authentication state (storageState) across parallel projects.

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Demonstrate how to reuse authentication state (storageState) across parallel projects and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Execute UI login once during global setup, save cookies and localStorage to `auth.json` using `page.context().storageState()`, and inject that file into parallel worker configs.

await page.context().storageState({ path: 'playwright/.auth/admin.json' });
Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Demonstrate how to reuse authentication state (storageState) across parallel projects over textbook wording.
  • Be ready to whiteboard the Demonstrate how to reuse authentication state (storageState) across parallel projects snippet live — panels often ask you to type it, not describe it.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Medium Very Common 1 minQ37 / 373

Q37.How do you execute component API testing using Playwright APIRequestContext?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you execute component API testing using Playwright APIRequestContext" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Playwright ships with `request` fixtures (`request.post()`) to seed database ledgers or verify REST APIs directly within end-to-end test files.

const res = await request.post('/api/users', { data: { name: 'SDET' } });
expect(res.status()).toBe(201);
Tips to remember
  • Walk through execute component API testing using Playwright APIRequestContext as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the execute component API testing using Playwright APIRequestContext snippet live — panels often ask you to type it, not describe it.
  • Assert status, schema and business payload — naming all three signals you test contracts, not just happy paths.
Medium Very Common 1 minQ38 / 373

Q38.Explain how to utilize Playwright Trace Viewer for post-mortem CI failure debugging.

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Open-ended "explain how to utilize Playwright Trace Viewer for post-mortem CI failure debugging" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

Configuring `trace: 'retain-on-failure'` captures network waterfalls, console logs, and DOM snapshots into `trace.zip`, which can be inspected interactively via `npx playwright show-trace`.

npx playwright show-trace test-results/failed-test/trace.zip
Tips to remember
  • Use a 3-part frame for how to utilize Playwright Trace Viewer for post-mortem CI failure debugging: what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how to utilize Playwright Trace Viewer for post-mortem CI failure debugging snippet live — panels often ask you to type it, not describe it.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Medium Very Common 1 minQ39 / 373

Q39.Implement visual regression testing using Playwright toHaveScreenshot().

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Implement visual regression testing using Playwright toHaveScreenshot() and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

`expect(page).toHaveScreenshot()` compares actual browser rendering against stored baseline PNG images, reporting pixel differences above tolerance limits.

await expect(page).toHaveScreenshot('dashboard.png', { maxDiffPixels: 50 });
Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Implement visual regression testing using Playwright toHaveScreenshot() over textbook wording.
  • Be ready to whiteboard the Implement visual regression testing using Playwright toHaveScreenshot() snippet live — panels often ask you to type it, not describe it.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Medium Very Common 1 minQ40 / 373

Q40.How do you configure sharding across distributed CI/CD runner nodes in GitHub Actions?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you configure sharding across distributed CI/CD runner nodes in GitHub Actions" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Passing `--shard=1/4` splits the test execution matrix across parallel Linux CI runners, reducing total suite execution time by 75%.

- run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
Tips to remember
  • Walk through configure sharding across distributed CI/CD runner nodes in GitHub Actions as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the configure sharding across distributed CI/CD runner nodes in GitHub Actions snippet live — panels often ask you to type it, not describe it.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Medium Very Common 1 minQ41 / 373

Q41.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #11).

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #11)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-11').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #11): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #11) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ42 / 373

Q42.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #12).

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #12)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-12').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #12): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #12) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ43 / 373

Q43.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #13).

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #13)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-13').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #13): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #13) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ44 / 373

Q44.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #14).

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #14)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-14').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #14): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #14) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ45 / 373

Q45.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #15).

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #15)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-15').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #15): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #15) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ46 / 373

Q46.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #16).

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #16)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-16').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #16): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #16) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ47 / 373

Q47.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #17).

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #17)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-17').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #17): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #17) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ48 / 373

Q48.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #18).

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #18)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-18').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #18): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #18) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ49 / 373

Q49.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #19).

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #19)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-19').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #19): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #19) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ50 / 373

Q50.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #20).

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #20)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-20').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #20): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #20) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ51 / 373

Q51.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #21).

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #21)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-21').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #21): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #21) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ52 / 373

Q52.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #22).

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #22)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-22').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #22): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #22) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ53 / 373

Q53.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #23).

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #23)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-23').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #23): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #23) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ54 / 373

Q54.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #24).

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #24)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-24').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #24): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #24) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ55 / 373

Q55.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #25).

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #25)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-25').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #25): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #25) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ56 / 373

Q56.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #26).

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #26)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-26').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #26): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #26) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ57 / 373

Q57.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #27).

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #27)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-27').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #27): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #27) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ58 / 373

Q58.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #28).

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #28)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-28').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #28): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #28) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ59 / 373

Q59.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #29).

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #29)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-29').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #29): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #29) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ60 / 373

Q60.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #30).

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #30)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-30').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #30): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #30) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ61 / 373

Q61.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #31).

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #31)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-31').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #31): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #31) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ62 / 373

Q62.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #32).

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #32)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-32').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #32): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #32) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ63 / 373

Q63.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #33).

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #33)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-33').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #33): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #33) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ64 / 373

Q64.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #34).

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #34)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-34').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #34): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #34) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ65 / 373

Q65.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #35).

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #35)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-35').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #35): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #35) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ66 / 373

Q66.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #36).

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #36)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-36').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #36): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #36) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ67 / 373

Q67.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #37).

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #37)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-37').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #37): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #37) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ68 / 373

Q68.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #38).

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #38)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-38').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #38): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #38) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ69 / 373

Q69.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #39).

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #39)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-39').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #39): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #39) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ70 / 373

Q70.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #40).

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #40)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-40').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #40): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #40) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ71 / 373

Q71.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #41).

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #41)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-41').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #41): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #41) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ72 / 373

Q72.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #42).

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #42)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-42').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #42): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #42) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ73 / 373

Q73.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #43).

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #43)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-43').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #43): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #43) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ74 / 373

Q74.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #44).

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #44)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-44').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #44): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #44) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ75 / 373

Q75.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #45).

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #45)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-45').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #45): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #45) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ76 / 373

Q76.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #46).

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #46)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-46').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #46): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #46) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ77 / 373

Q77.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #47).

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #47)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-47').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #47): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #47) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ78 / 373

Q78.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #48).

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #48)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-48').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #48): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #48) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ79 / 373

Q79.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #49).

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #49)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-49').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #49): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #49) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Medium Very Common 1 minQ80 / 373

Q80.Explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #50).

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Open-ended "explain how Playwright handles advanced cross-browser execution and iframe isolation (Topic #50)" prompts test how you structure a technical answer under pressure. Panels look for a clear opening definition, one worked example, and a closing sentence on the pitfall they were about to ask about next.

Detailed explanation

In Playwright, cross-browser execution across Chromium, WebKit, and Firefox is achieved over out-of-process WebSocket connections. When interacting with frames or shadow DOM, `page.frameLocator('iframe#payment')` scopes locators directly into child document structures without requiring manual context switching commands.

await page.frameLocator('#frame-50').getByRole('button').click();
Tips to remember
  • Use a 3-part frame for how Playwright handles advanced cross-browser execution and iframe isolation (Topic #50): what it is → how it works → one gotcha you've hit in a real Playwright project.
  • Be ready to whiteboard the how Playwright handles advanced cross-browser execution and iframe isolation (Topic #50) snippet live — panels often ask you to type it, not describe it.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Confidence check

If you can confidently answer the Fresher (0–1 yrs) questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

2. Mid-level (2–4 yrs)

Easy Very Common 1 minQ81 / 373

Q81.What is waitForLoadState?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "waitForLoadState" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

waitForLoadState waits for page load states such as load, domcontentloaded, or networkidle. It should be used carefully because Playwright actions and assertions already wait in many cases. Avoid unnecessary load-state waits.

Tips to remember
  • Open with a one-sentence definition of waitForLoadState, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise waitForLoadState cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ82 / 373

Q82.What is waitForResponse?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "waitForResponse" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

waitForResponse waits for a specific network response. It is useful when UI changes depend on an API call. You can wait for a URL pattern, status code, or response predicate.

Tips to remember
  • Open with a one-sentence definition of waitForResponse, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise waitForResponse cleanly.
  • Assert status, schema and business payload — naming all three signals you test contracts, not just happy paths.
Easy Very Common 1 minQ83 / 373

Q83.What is waitForURL?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "waitForURL" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

waitForURL waits until the page URL matches a pattern or string. It is commonly used after login, redirects, or navigation flows. It is better than using arbitrary waits after clicking a navigation button.

Tips to remember
  • Open with a one-sentence definition of waitForURL, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise waitForURL cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ84 / 373

Q84.Why are hard waits bad?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

"Why" questions on hard waits bad probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Hard waits like waitForTimeout slow down tests and create flakiness because they guess timing instead of waiting for real conditions. Use locators, assertions, waitForResponse, or waitForURL instead.

Tips to remember
  • Tie the "why" for hard waits bad back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise hard waits bad cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Very Common 1 minQ85 / 373

Q85.How do you prevent flaky tests in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you prevent flaky tests" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use stable locators, web-first assertions, isolated test data, storageState for login, avoid hard waits, control network dependencies, run tests independently, and analyze failures using traces. Flakiness is usually a design problem, not a tool problem.

Tips to remember
  • Walk through prevent flaky tests as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise prevent flaky tests cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Very Common 1 minQ86 / 373

Q86.How do you handle animations in Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you handle animations" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Playwright waits for elements to be stable before actions. If animations still cause issues, reduce unnecessary animations in test environments or wait for a meaningful final state. Avoid fixed waits unless there is no better condition.

Tips to remember
  • Walk through handle animations as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle animations cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ87 / 373

Q87.When can auto-waiting fail?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Timing questions like this check whether you understand the trade-offs of can auto-waiting fail. Interviewers want to hear the specific signals in a project that make you pick it over the alternative, plus one case where it's the wrong choice.

Detailed explanation

Auto-waiting may not help when the element is visible but data is not ready, when custom JavaScript state is incomplete, or when an API response is delayed. In such cases, wait for a specific assertion, response, or UI state.

Tips to remember
  • Answer in the form "Use can auto-waiting fail when …, avoid it when …" so the interviewer hears both sides in one breath.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise can auto-waiting fail cleanly.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Medium Very Common 1 minQ88 / 373

Q88.Show an action and assertion example.

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Show an action and assertion example and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Example: ``ts await page.goto('/login'); await page.getByLabel('Email').fill('qa@example.com'); await page.getByLabel('Password').fill('Password123'); await page.getByRole('button', { name: 'Sign in' }).click(); await expect(page).toHaveURL(/dashboard/); await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible(); `` This uses user-focused locators and web-first assertions. CTA after Q100: Ready to practice these Playwright answers in a real interview format? Try AI Mock Interview → /ai-mock-interview Start Free → /login

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Show an action and assertion example over textbook wording.
  • Be ready to whiteboard the Show an action and assertion example snippet live — panels often ask you to type it, not describe it.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Very Common 1 minQ89 / 373

Q89.What is a browser object in Playwright?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "browser object" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

The browser object represents a browser instance such as Chromium, Firefox, or WebKit. It can create browser contexts and pages. In Playwright Test, the browser fixture is usually managed automatically.

Tips to remember
  • Open with a one-sentence definition of browser object, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise browser object cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Very Common 1 minQ90 / 373

Q90.What is a browser context?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "browser context" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A browser context is an isolated session within a browser. It has separate cookies, local storage, session storage, permissions, and cache. Contexts make test isolation fast and efficient.

Tips to remember
  • Open with a one-sentence definition of browser context, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise browser context cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ91 / 373

Q91.What is a page in Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "page" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A page represents a single browser tab or window. Most interactions such as goto, click, fill, and assertions happen on the page or locators created from the page.

Tips to remember
  • Open with a one-sentence definition of page, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise page cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ92 / 373

Q92.Why are browser contexts important?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

"Why" questions on browser contexts important probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Browser contexts allow tests to run independently without sharing login state or cookies. They are lighter than launching new browsers and enable fast parallel execution. This is one of Playwright’s biggest architectural advantages.

Tips to remember
  • Tie the "why" for browser contexts important back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise browser contexts important cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Very Common 1 minQ93 / 373

Q93.How do you manage cookies in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you manage cookies" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Cookies can be added, read, or cleared through browserContext methods such as addCookies(), cookies(), and clearCookies(). Cookie management is useful for authentication, personalization, and session validation tests.

Tips to remember
  • Walk through manage cookies as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise manage cookies cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Very Common 1 minQ94 / 373

Q94.How do you manage localStorage and sessionStorage?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you manage localStorage and sessionStorage" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can access storage using page.evaluate() or save storage using storageState. For authentication reuse, storageState is preferred because it captures cookies and localStorage in a reusable file.

Tips to remember
  • Walk through manage localStorage and sessionStorage as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise manage localStorage and sessionStorage cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Very Common 1 minQ95 / 373

Q95.How do you handle popups in Playwright?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you handle popups" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.waitForEvent('popup') before the action that opens the popup. Then interact with the popup page like any other page. This handles OAuth windows, payment popups, and external links.

Tips to remember
  • Walk through handle popups as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle popups cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Very Common 1 minQ96 / 373

Q96.Why is frameLocator recommended?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

"Why" questions on frameLocator recommended probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

frameLocator provides a clean and retry-friendly way to locate elements inside frames. It avoids manual frame switching and works naturally with Playwright locators.

Tips to remember
  • Tie the "why" for frameLocator recommended back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise frameLocator recommended cleanly.
  • Finish by saying you always return to the default content after frame work — forgetting that is the classic failure this question hunts for.
Easy Very Common 1 minQ97 / 373

Q97.How do you grant browser permissions?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you grant browser permissions" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Permissions can be granted in context options using permissions: ['geolocation'] or by calling context.grantPermissions(). This is useful for testing camera, microphone, clipboard, notifications, and geolocation.

Tips to remember
  • Walk through grant browser permissions as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise grant browser permissions cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ98 / 373

Q98.How do you test geolocation?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you test geolocation" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Create a context with geolocation coordinates and grant geolocation permission. This allows testing location-based features such as stores near me, delivery availability, or regional content.

Tips to remember
  • Walk through test geolocation as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test geolocation cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ99 / 373

Q99.How do you set viewport size?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you set viewport size" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Viewport can be configured in playwright.config.ts or per test using page.setViewportSize(). Viewport testing helps validate responsive UI behavior across desktop, tablet, and mobile layouts.

Tips to remember
  • Walk through set viewport size as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise set viewport size cleanly.
  • Split the answer into emulator (fast feedback) vs real device (final gate) and say where each runs in your pipeline.
Easy Very Common 1 minQ100 / 373

Q100.What is device emulation in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "device emulation" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Device emulation simulates mobile or tablet devices using predefined descriptors. It can configure viewport, user agent, device scale factor, touch support, and browser behavior. It is useful for responsive testing.

Tips to remember
  • Open with a one-sentence definition of device emulation, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise device emulation cleanly.
  • Split the answer into emulator (fast feedback) vs real device (final gate) and say where each runs in your pipeline.
Easy Very Common 1 minQ101 / 373

Q101.How do you set locale and timezone?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you set locale and timezone" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Locale and timezone can be set in context options. This helps test date formats, currency, language-specific UI, timezone calculations, and region-specific behavior.

Tips to remember
  • Walk through set locale and timezone as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise set locale and timezone cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ102 / 373

Q102.What is storageState?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "storageState" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

storageState saves browser authentication state, including cookies and localStorage. It allows tests to start already logged in without repeating login steps. This improves speed and stability.

Tips to remember
  • Open with a one-sentence definition of storageState, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise storageState cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Very Common 1 minQ103 / 373

Q103.How do you reuse authentication sessions?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you reuse authentication sessions" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Login once in globalSetup, save storageState to a JSON file, and configure tests to use that file. This avoids repeated UI login and makes tests faster.

Tips to remember
  • Walk through reuse authentication sessions as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise reuse authentication sessions cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Very Common 1 minQ104 / 373

Q104.Should you reuse the same page across tests?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Should you reuse the same page across tests and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Usually no. Each test should use a fresh page and context to maintain isolation. Reusing pages can create hidden dependencies and flaky behavior.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Should you reuse the same page across tests over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Should you reuse the same page across tests cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Very Common 1 minQ105 / 373

Q105.Are browser contexts similar to incognito mode?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Are browser contexts similar to incognito mode and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Browser contexts behave like independent incognito sessions. They do not share cookies or storage unless explicitly configured. This makes them ideal for parallel testing.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Are browser contexts similar to incognito mode over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Are browser contexts similar to incognito mode cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Very Common 1 minQ106 / 373

Q106.How do you handle file downloads?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you handle file downloads" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.waitForEvent('download') before triggering the download. Then you can check the suggested filename, save the file, or validate its contents.

Tips to remember
  • Walk through handle file downloads as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle file downloads cleanly.
  • Explain how you test asynchronous flows (polling, consumer assertions, timeouts) rather than treating it as a sync call.
Easy Very Common 1 minQ107 / 373

Q107.How do you handle browser dialogs?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you handle browser dialogs" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.on('dialog') to accept, dismiss, or inspect alert, confirm, and prompt dialogs. Register the dialog handler before performing the action that triggers the dialog.

Tips to remember
  • Walk through handle browser dialogs as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle browser dialogs cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ108 / 373

Q108.How do you handle a new window?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you handle a new window" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

A new window can be handled similarly to a popup or new page event. Wait for the popup or page event, then interact with the returned Page object.

Tips to remember
  • Walk through handle a new window as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle a new window cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Very Common 1 minQ109 / 373

Q109.What options can be set at browser context level?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What options can be set at browser context level and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Context options include viewport, storageState, permissions, geolocation, locale, timezone, colorScheme, userAgent, extraHTTPHeaders, httpCredentials, and recordVideo. These options control browser behavior for tests.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What options can be set at browser context level over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What options can be set at browser context level cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ110 / 373

Q110.What causes test isolation issues?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What causes test isolation issues and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Isolation issues happen when tests share users, data, browser state, or backend records. They often appear only in parallel execution. Use independent contexts, unique data, and cleanup strategies to avoid them.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What causes test isolation issues over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What causes test isolation issues cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Medium Very Common 1 minQ111 / 373

Q111.Give an example of creating a context.

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Give an example of creating a context and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Example: ``ts const context = await browser.newContext({ viewport: { width: 1280, height: 720 }, storageState: 'auth/user.json' }); const page = await context.newPage(); await page.goto('/dashboard'); `` This creates an isolated logged-in session.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Give an example of creating a context over textbook wording.
  • Be ready to whiteboard the Give an example of creating a context snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ112 / 373

Q112.What are fixtures in Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "fixtures" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Fixtures are reusable objects or setup logic provided to tests. Built-in fixtures include page, browser, context, request, and browserName. Custom fixtures help share page objects, test data, and services.

Tips to remember
  • Open with a one-sentence definition of fixtures, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise fixtures cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Very Common 1 minQ113 / 373

Q113.What are built-in fixtures?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "built-in fixtures" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Built-in fixtures are provided by Playwright Test. Common examples are page, context, browser, request, browserName, baseURL, and testInfo. They reduce boilerplate and improve consistency.

Tips to remember
  • Open with a one-sentence definition of built-in fixtures, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise built-in fixtures cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Very Common 1 minQ114 / 373

Q114.What is a custom fixture?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "custom fixture" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A custom fixture is a user-defined fixture that provides reusable setup to tests. For example, you can create a loginPage fixture, apiClient fixture, or authenticatedPage fixture.

Tips to remember
  • Open with a one-sentence definition of custom fixture, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise custom fixture cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Very Common 1 minQ115 / 373

Q115.What is a test-scoped fixture?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "test-scoped fixture" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A test-scoped fixture is created separately for each test. It is useful for page objects, test data, and any state that must not be shared between tests.

Tips to remember
  • Open with a one-sentence definition of test-scoped fixture, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test-scoped fixture cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Very Common 1 minQ116 / 373

Q116.What is a worker-scoped fixture?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "worker-scoped fixture" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A worker-scoped fixture is created once per worker process. It is useful for expensive setup such as creating a test account or initializing a service client. It must be safe for tests running in that worker.

Tips to remember
  • Open with a one-sentence definition of worker-scoped fixture, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise worker-scoped fixture cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Very Common 1 minQ117 / 373

Q117.What is beforeEach?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "beforeEach" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

beforeEach runs before every test in a scope. It is commonly used for navigation, preparing test state, or resetting page conditions. Avoid placing heavy setup in beforeEach if it slows the suite.

Tips to remember
  • Open with a one-sentence definition of beforeEach, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise beforeEach cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Very Common 1 minQ118 / 373

Q118.What is afterEach?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "afterEach" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

afterEach runs after every test. It is useful for cleanup, attaching logs, resetting data, or capturing additional diagnostics. Playwright also provides testInfo to access test status and artifacts.

Tips to remember
  • Open with a one-sentence definition of afterEach, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise afterEach cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ119 / 373

Q119.What is beforeAll?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "beforeAll" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

beforeAll runs once before all tests in a describe block. It is useful for expensive setup shared by tests. Be careful because shared state can reduce test isolation.

Tips to remember
  • Open with a one-sentence definition of beforeAll, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise beforeAll cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Very Common 1 minQ120 / 373

Q120.What is afterAll?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "afterAll" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

afterAll runs once after all tests in a describe block. It is used for final cleanup, closing external resources, or deleting shared test data created in beforeAll.

Tips to remember
  • Open with a one-sentence definition of afterAll, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise afterAll cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Confidence check

If you can confidently answer the Mid-level (2–4 yrs) questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

3. Senior / SDET (5+ yrs)

Easy Very Common 1 minQ121 / 373

Q121.How do you capture console logs?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you capture console logs" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.on('console', msg => console.log(msg.text())). Console logs help debug frontend errors, warnings, and application logs during test execution.

Tips to remember
  • Walk through capture console logs as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise capture console logs cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ122 / 373

Q122.How do you capture page errors?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you capture page errors" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.on('pageerror', error => ...). Page errors indicate uncaught JavaScript exceptions. Capturing them helps detect frontend issues even if the UI appears normal.

Tips to remember
  • Walk through capture page errors as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise capture page errors cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ123 / 373

Q123.What are test artifacts?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "test artifacts" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Artifacts are files generated during tests, such as screenshots, videos, traces, logs, and reports. They help investigate failures, especially in CI environments where the browser is not visible.

Tips to remember
  • Open with a one-sentence definition of test artifacts, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test artifacts cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Very Common 1 minQ124 / 373

Q124.What is the HTML reporter?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "HTML reporter" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

The HTML reporter generates an interactive report showing passed, failed, skipped, and flaky tests. It includes test steps, errors, screenshots, videos, and traces when configured.

Tips to remember
  • Open with a one-sentence definition of HTML reporter, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise HTML reporter cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Very Common 1 minQ125 / 373

Q125.What is the JSON reporter?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "JSON reporter" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

The JSON reporter outputs test results in machine-readable format. It is useful for dashboards, custom reporting, analytics, and integration with internal tools.

Tips to remember
  • Open with a one-sentence definition of JSON reporter, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise JSON reporter cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Very Common 1 minQ126 / 373

Q126.What is the JUnit reporter?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "JUnit reporter" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

The JUnit reporter creates XML output compatible with CI tools such as Jenkins, GitLab CI, Azure DevOps, and test reporting plugins. It is commonly used in enterprise pipelines.

Tips to remember
  • Open with a one-sentence definition of JUnit reporter, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise JUnit reporter cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Very Common 1 minQ127 / 373

Q127.Can Playwright integrate with Allure?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can Playwright integrate with Allure and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Playwright can integrate with Allure using third-party reporters. Allure provides rich reports, history, categories, attachments, and trend analysis for larger QA teams.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can Playwright integrate with Allure over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can Playwright integrate with Allure cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Very Common 1 minQ128 / 373

Q128.How do you upload artifacts in CI?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you upload artifacts in CI" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Configure CI to upload playwright-report, test-results, screenshots, videos, and traces as build artifacts. This allows developers to debug failures after the pipeline finishes.

Tips to remember
  • Walk through upload artifacts in CI as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise upload artifacts in CI cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Very Common 1 minQ129 / 373

Q129.How do you debug flaky tests?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you debug flaky tests" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Analyze traces, screenshots, videos, retries, network logs, and test data. Look for weak locators, race conditions, shared state, slow APIs, or environment instability. Fix the root cause instead of increasing timeouts blindly.

Tips to remember
  • Walk through debug flaky tests as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise debug flaky tests cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Very Common 1 minQ130 / 373

Q130.What is time-travel debugging?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "time-travel debugging" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Time-travel debugging means inspecting each step of a test using Trace Viewer. You can see what the page looked like before and after actions, which network calls happened, and why an assertion failed.

Tips to remember
  • Open with a one-sentence definition of time-travel debugging, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise time-travel debugging cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Very Common 1 minQ131 / 373

Q131.How do you investigate slow tests?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you investigate slow tests" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use reports and traces to identify slow steps, repeated login, unnecessary waits, heavy setup, or slow backend responses. Optimize by using API setup, storageState, parallel execution, and focused assertions.

Tips to remember
  • Walk through investigate slow tests as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise investigate slow tests cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Very Common 1 minQ132 / 373

Q132.What is good failure analysis?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "good failure analysis" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Good failure analysis identifies whether the issue is test code, application bug, data problem, environment issue, or network dependency. Attach traces and logs so developers can reproduce and fix failures quickly.

Tips to remember
  • Open with a one-sentence definition of good failure analysis, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise good failure analysis cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Very Common 1 minQ133 / 373

Q133.How do you debug locator strictness errors?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you debug locator strictness errors" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Check how many elements the locator matches using count() or inspect it in the trace viewer. Improve the locator by adding role name, filtering by text, or narrowing scope with parent locators.

Tips to remember
  • Walk through debug locator strictness errors as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise debug locator strictness errors cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Very Common 1 minQ134 / 373

Q134.How do you debug network failures?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you debug network failures" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.on('requestfailed'), response logs, trace viewer network tab, and waitForResponse. Validate status codes, payloads, authentication headers, and environment availability.

Tips to remember
  • Walk through debug network failures as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise debug network failures cleanly.
  • Assert status, schema and business payload — naming all three signals you test contracts, not just happy paths.
Easy Very Common 1 minQ135 / 373

Q135.Can Playwright do screenshot comparisons?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can Playwright do screenshot comparisons and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Playwright supports visual comparisons using expect(page).toHaveScreenshot(). This is useful for visual regression testing, but baselines must be managed carefully across browsers and operating systems.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can Playwright do screenshot comparisons over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can Playwright do screenshot comparisons cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Very Common 1 minQ136 / 373

Q136.Why use trace on first retry?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

"Why" questions on use trace on first retry probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Trace on first retry captures diagnostic information only when a test fails and retries. It keeps CI storage lower than tracing every test while still providing useful debugging data for flaky failures.

Tips to remember
  • Tie the "why" for use trace on first retry back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise use trace on first retry cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Very Common 1 minQ137 / 373

Q137.How do you debug local versus CI failures?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you debug local versus CI failures" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Compare browser version, OS, viewport, environment variables, baseURL, test data, timezone, locale, and resource speed. CI often exposes race conditions because it runs slower or more parallel than local machines.

Tips to remember
  • Walk through debug local versus CI failures as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise debug local versus CI failures cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Medium Very Common 1 minQ138 / 373

Q138.Give an example of debugging configuration.

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Give an example of debugging configuration and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Example: ``ts use: { screenshot: 'only-on-failure', video: 'retain-on-failure', trace: 'on-first-retry' }, reporter: [['html'], ['junit', { outputFile: 'results.xml' }]] `` This configuration captures useful failure artifacts.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Give an example of debugging configuration over textbook wording.
  • Be ready to whiteboard the Give an example of debugging configuration snippet live — panels often ask you to type it, not describe it.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Very Common 1 minQ139 / 373

Q139.What is a good Playwright framework structure?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "good Playwright framework structure" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A good structure separates tests, pages, fixtures, test data, utilities, API clients, configuration, and reports. This improves maintainability and helps teams scale automation without duplicating code.

Tips to remember
  • Open with a one-sentence definition of good Playwright framework structure, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise good Playwright framework structure cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Very Common 1 minQ140 / 373

Q140.What is Page Object Model?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "Page Object Model" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Page Object Model is a design pattern where page-specific locators and actions are stored in separate classes. Tests call meaningful methods like login() or addProductToCart() instead of directly handling every selector.

Tips to remember
  • Open with a one-sentence definition of Page Object Model, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Page Object Model cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Very Common 1 minQ141 / 373

Q141.What are the benefits of POM?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "benefits of POM" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

POM improves readability, reusability, maintainability, and abstraction. If a locator changes, it is updated in one page class instead of many tests. It also makes test scenarios easier to understand.

Tips to remember
  • Open with a one-sentence definition of benefits of POM, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise benefits of POM cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Very Common 1 minQ142 / 373

Q142.Where should locators be stored in POM?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Where should locators be stored in POM and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Locators should be stored inside the page object class as readonly locator properties or methods. This keeps UI implementation details away from tests and makes maintenance easier.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Where should locators be stored in POM over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Where should locators be stored in POM cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Very Common 1 minQ143 / 373

Q143.How do fixtures improve POM?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you How do fixtures improve POM" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Fixtures can create and inject page objects into tests automatically. This avoids repetitive initialization and gives every test a clean, consistent object setup.

Tips to remember
  • Walk through How do fixtures improve POM as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How do fixtures improve POM cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Very Common 1 minQ144 / 373

Q144.What are component objects?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "component objects" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Component objects represent reusable UI components such as navigation bars, modals, tables, date pickers, or product cards. They reduce duplication when the same component appears on multiple pages.

Tips to remember
  • Open with a one-sentence definition of component objects, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise component objects cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ145 / 373

Q145.What is a service or API layer?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "service or API layer" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A service layer contains reusable API methods for setup, cleanup, and backend validation. It keeps API logic separate from UI tests and supports hybrid automation strategies.

Tips to remember
  • Open with a one-sentence definition of service or API layer, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise service or API layer cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Very Common 1 minQ146 / 373

Q146.What is a base page?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "base page" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A base page contains shared page behavior such as navigation helpers, common waits, screenshot helpers, or shared components. Avoid putting too much logic in the base page because it can become a dumping ground.

Tips to remember
  • Open with a one-sentence definition of base page, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise base page cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Very Common 1 minQ147 / 373

Q147.What utilities are useful in a Playwright framework?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What utilities are useful in a Playwright framework and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Useful utilities include data generators, date helpers, file helpers, API clients, environment readers, custom assertions, test data builders, and logging helpers. Utilities should be small and focused.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What utilities are useful in a Playwright framework over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What utilities are useful in a Playwright framework cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ148 / 373

Q148.What are reusable assertions?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "reusable assertions" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Reusable assertions are helper methods for common validations, such as verifying toast messages, table rows, or page headers. They reduce duplication and improve consistency across tests.

Tips to remember
  • Open with a one-sentence definition of reusable assertions, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise reusable assertions cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Very Common 1 minQ149 / 373

Q149.Should Playwright have custom commands like Cypress?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Should Playwright have custom commands like Cypress and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Playwright does not use custom commands in the same way as Cypress. Instead, use fixtures, helper functions, page objects, and custom expect matchers when needed.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Should Playwright have custom commands like Cypress over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Should Playwright have custom commands like Cypress cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Common 1 minQ150 / 373

Q150.What are test data builders?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "test data builders" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Test data builders create test objects with sensible defaults and allow overriding specific fields. They make tests cleaner and reduce repeated data setup code.

Tips to remember
  • Open with a one-sentence definition of test data builders, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test data builders cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ151 / 373

Q151.What should a reporting layer include?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What should a reporting layer include and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

A reporting layer should include HTML reports, CI reports, screenshots, traces, videos, logs, and test metadata. For large teams, Allure or dashboard integrations may be useful.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What should a reporting layer include over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What should a reporting layer include cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ152 / 373

Q152.How should configuration be designed?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on How should configuration be designed and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Configuration should separate common settings from environment-specific values. Use baseURL, projects, environment variables, and CI overrides. Avoid hardcoding URLs, credentials, or browser settings inside tests.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on How should configuration be designed over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How should configuration be designed cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ153 / 373

Q153.How do you manage environments in a framework?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you manage environments in a framework" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use environment variables such as BASE_URL, USER_EMAIL, and API_URL. Optionally use config files for dev, QA, staging, and production. The same tests should run across environments with minimal changes.

Tips to remember
  • Walk through manage environments in a framework as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise manage environments in a framework cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ154 / 373

Q154.How do you make a framework scalable?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you make a framework scalable" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Design independent tests, reusable fixtures, stable locators, API setup, parallel execution, clear folders, tagging, reporting, and CI integration. Scalability depends on both technical design and team discipline.

Tips to remember
  • Walk through make a framework scalable as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise make a framework scalable cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ155 / 373

Q155.How do you make tests maintainable?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you make tests maintainable" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use readable test names, stable locators, POM or screen objects, reusable helpers, limited duplication, good code reviews, and meaningful assertions. Avoid hiding too much logic inside large helper methods.

Tips to remember
  • Walk through make tests maintainable as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise make tests maintainable cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Common 1 minQ156 / 373

Q156.What should be checked in Playwright code reviews?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What should be checked in Playwright code reviews and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Review locator quality, test independence, assertion strength, data setup, cleanup, hard waits, readability, unnecessary retries, and whether the test validates real business value.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What should be checked in Playwright code reviews over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What should be checked in Playwright code reviews cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ157 / 373

Q157.What is overengineering in automation frameworks?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "overengineering in automation frameworks" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Overengineering means adding unnecessary abstraction, complex inheritance, generic wrappers, or framework code that makes tests harder to read. A good framework should simplify testing, not become harder than the product.

Tips to remember
  • Open with a one-sentence definition of overengineering in automation frameworks, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise overengineering in automation frameworks cleanly.
  • Bring numbers: what percentage sits at unit/API/UI and how long the suite takes — strategy answers need a shape.
Easy Common 1 minQ158 / 373

Q158.Why are naming conventions important?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

"Why" questions on naming conventions important probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Consistent names for tests, page objects, fixtures, and data files help teams understand and maintain the framework. Good naming reduces onboarding time and prevents confusion.

Tips to remember
  • Tie the "why" for naming conventions important back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise naming conventions important cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Common 1 minQ159 / 373

Q159.Should assertions be inside page objects?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Should assertions be inside page objects and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Basic UI state checks can be inside page objects, but business assertions are often clearer in tests. Avoid hiding all expectations inside page methods because tests should clearly show what is being verified.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Should assertions be inside page objects over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Should assertions be inside page objects cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Common 1 minQ160 / 373

Q160.Should selectors be centralized globally?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Should selectors be centralized globally and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Not usually. Selectors should be close to the page or component they belong to. A giant global selector file becomes hard to maintain and does not scale well.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Should selectors be centralized globally over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Should selectors be centralized globally cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Confidence check

If you can confidently answer the Senior / SDET (5+ yrs) questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

4. Playwright Fundamentals

Easy Common 1 minQ161 / 373

Q161.Why is Playwright used in automation testing?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

"Why" questions on Playwright used in automation testing probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Playwright is used to automate browser-based testing for modern web applications. It can test user flows, forms, navigation, authentication, file upload, downloads, and cross-browser behavior. Teams prefer it because it includes auto-waiting, fast execution, built-in test runner, screenshots, videos, trace viewer, and API testing support.

Tips to remember
  • Tie the "why" for Playwright used in automation testing back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright used in automation testing cleanly.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Easy Common 1 minQ162 / 373

Q162.Which browsers does Playwright support?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Listing questions on Which browsers does Playwright support look easy but trap candidates who rattle off names without depth. Interviewers score higher when you group the items, mention which you use most, and add one line of context per item.

Detailed explanation

Playwright supports Chromium, Firefox, and WebKit browser engines. This means it can test applications on Chrome, Edge, Firefox, and Safari-like environments. Its WebKit support is especially useful for validating Safari behavior on non-macOS CI environments.

Tips to remember
  • Group the items into 2–3 categories before listing — panels remember structure, not raw counts.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Which browsers does Playwright support cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ163 / 373

Q163.Which programming languages are supported by Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Listing questions on Which programming languages are supported by Playwright look easy but trap candidates who rattle off names without depth. Interviewers score higher when you group the items, mention which you use most, and add one line of context per item.

Detailed explanation

Playwright supports TypeScript, JavaScript, Python, Java, and .NET. TypeScript is the most common choice because Playwright Test is highly optimized for Node.js and provides strong typing, better autocomplete, and easier framework maintenance.

Tips to remember
  • Group the items into 2–3 categories before listing — panels remember structure, not raw counts.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Which programming languages are supported by Playwright cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ164 / 373

Q164.What is Playwright Test?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "Playwright Test" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Playwright Test is the official test runner provided by Playwright. It supports fixtures, assertions, retries, parallel execution, projects, reporters, tracing, screenshots, and videos. It removes the need for separate test runners like Jest or Mocha in most Playwright projects.

Tips to remember
  • Open with a one-sentence definition of Playwright Test, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright Test cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ165 / 373

Q165.How is Playwright different from traditional browser automation tools?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on How is Playwright different from traditional browser automation tools and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Playwright is designed for modern web apps. It uses auto-waiting, isolated browser contexts, built-in parallel execution, native network interception, and trace debugging. Unlike older tools that require many manual waits and separate drivers, Playwright provides a more integrated automation experience.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on How is Playwright different from traditional browser automation tools over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How is Playwright different from traditional browser automation tools cleanly.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Easy Common 1 minQ166 / 373

Q166.What is the difference between a browser and a browser engine in Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "difference between a browser and a browser engine" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A browser is the actual application users interact with, such as Chrome or Firefox. A browser engine is the underlying rendering engine, such as Chromium, Firefox, or WebKit. Playwright automates browser engines to provide cross-browser coverage.

Tips to remember
  • Open with a one-sentence definition of difference between a browser and a browser engine, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise difference between a browser and a browser engine cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ167 / 373

Q167.What is headless mode in Playwright?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "headless mode" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Headless mode runs the browser without opening a visible UI. It is faster and commonly used in CI/CD pipelines. Playwright also supports headed mode, where the browser opens visibly, which is useful during debugging and test development.

Tips to remember
  • Open with a one-sentence definition of headless mode, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise headless mode cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Medium Common 1 minQ168 / 373

Q168.Why do many teams choose Playwright over Selenium?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

"Why" questions on many teams choose Playwright over Selenium probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Teams choose Playwright over Selenium because Playwright has built-in auto-waiting, faster parallel execution, browser contexts, network mocking, trace viewer, and simpler setup. Selenium is still widely used, but Playwright is often preferred for new modern web automation projects. Read the detailed comparison in our Playwright vs Selenium guide and our Selenium interview questions page.

Tips to remember
  • Tie the "why" for many teams choose Playwright over Selenium back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise many teams choose Playwright over Selenium cleanly.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Easy Common 1 minQ169 / 373

Q169.How is Playwright different from Cypress?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on How is Playwright different from Cypress and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Playwright supports Chromium, Firefox, and WebKit, while Cypress mainly focuses on browser testing with a different execution model. Playwright supports multiple tabs, multiple browser contexts, native downloads, API testing, and stronger cross-browser support. Cypress has strong developer tooling but different architectural limitations.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on How is Playwright different from Cypress over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How is Playwright different from Cypress cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ170 / 373

Q170.What are the main advantages of Playwright?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "main advantages of Playwright" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

The main advantages are auto-waiting, reliable locators, cross-browser support, fast parallel execution, browser context isolation, network interception, API testing, trace viewer, screenshots, videos, and built-in reporting. These features help teams build stable automation frameworks faster.

Tips to remember
  • Open with a one-sentence definition of main advantages of Playwright, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise main advantages of Playwright cleanly.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Easy Common 1 minQ171 / 373

Q171.What are the limitations of Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "limitations of Playwright" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Playwright is mainly focused on web testing, not native mobile or desktop application testing. It requires programming knowledge and may need extra setup for complex enterprise environments. Some real Safari behavior still requires testing on actual Safari devices, even though WebKit coverage is strong.

Tips to remember
  • Open with a one-sentence definition of limitations of Playwright, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise limitations of Playwright cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ172 / 373

Q172.What types of testing can be done with Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What types of testing can be done with Playwright and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Playwright can be used for end-to-end UI testing, regression testing, smoke testing, cross-browser testing, API testing, visual testing, accessibility checks, authentication testing, and network mocking. It is commonly used by QA automation engineers and SDETs.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What types of testing can be done with Playwright over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What types of testing can be done with Playwright cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Common 1 minQ173 / 373

Q173.What is auto-waiting in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "auto-waiting" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Auto-waiting means Playwright automatically waits for elements to be ready before performing actions. For example, before clicking a button, it checks whether the element is attached, visible, stable, enabled, and able to receive events. This reduces the need for manual waits.

Tips to remember
  • Open with a one-sentence definition of auto-waiting, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise auto-waiting cleanly.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Easy Common 1 minQ174 / 373

Q174.What is a locator in Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "locator" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A locator is Playwright’s recommended way to find and interact with elements. Locators are lazy and retry automatically until the element is available. Examples include page.getByRole(), page.getByText(), page.getByLabel(), and page.locator().

Tips to remember
  • Open with a one-sentence definition of locator, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise locator cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ175 / 373

Q175.What is a browser context in Playwright?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "browser context" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A browser context is an isolated browser session inside a browser instance. Each context has separate cookies, local storage, session storage, and permissions. It behaves like an incognito session and helps tests run independently in parallel.

Tips to remember
  • Open with a one-sentence definition of browser context, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise browser context cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ176 / 373

Q176.Why is TypeScript popular with Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

"Why" questions on TypeScript popular with Playwright probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

TypeScript is popular because Playwright’s official runner works very well with Node.js and TypeScript. TypeScript provides type safety, better IDE support, autocomplete, fewer runtime errors, and easier maintenance for large automation frameworks.

Tips to remember
  • Tie the "why" for TypeScript popular with Playwright back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise TypeScript popular with Playwright cleanly.
  • Bring numbers: what percentage sits at unit/API/UI and how long the suite takes — strategy answers need a shape.
Easy Common 1 minQ177 / 373

Q177.Does Playwright require browser drivers like Selenium?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Does Playwright require browser drivers like Selenium and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

No. Playwright does not require separate browser drivers like ChromeDriver or GeckoDriver. It downloads and manages browser binaries automatically. This simplifies setup and avoids many driver-version mismatch issues common in Selenium projects.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Does Playwright require browser drivers like Selenium over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Does Playwright require browser drivers like Selenium cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ178 / 373

Q178.What is test isolation in Playwright?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "test isolation" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Test isolation means each test runs independently without sharing browser state such as cookies, sessions, or local storage. Playwright achieves this using browser contexts. Good isolation prevents one test from affecting another and improves reliability.

Tips to remember
  • Open with a one-sentence definition of test isolation, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test isolation cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ179 / 373

Q179.Can Playwright be used in CI/CD pipelines?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can Playwright be used in CI/CD pipelines and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Playwright is highly suitable for CI/CD pipelines. It supports headless execution, retries, parallel workers, sharding, HTML reports, JUnit reports, screenshots, videos, traces, and official Docker images. It integrates well with GitHub Actions, Jenkins, GitLab CI, and Azure DevOps.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can Playwright be used in CI/CD pipelines over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can Playwright be used in CI/CD pipelines cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ180 / 373

Q180.Is Playwright good for cross-browser testing?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Is Playwright good for cross-browser testing and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Playwright is very strong for cross-browser testing because it supports Chromium, Firefox, and WebKit with one API. Teams can define browser projects in the Playwright config and run the same test suite across multiple browsers.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Is Playwright good for cross-browser testing over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Is Playwright good for cross-browser testing cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ181 / 373

Q181.What are real-world use cases of Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "real-world use cases of Playwright" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Real-world use cases include testing login flows, checkout journeys, dashboards, admin portals, role-based access, file upload/download, email verification flows, API-driven setup, network error states, and regression suites for modern single-page applications.

Tips to remember
  • Open with a one-sentence definition of real-world use cases of Playwright, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise real-world use cases of Playwright cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ182 / 373

Q182.Why are Playwright tests usually less flaky?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

"Why" questions on Playwright tests usually less flaky probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Playwright tests are less flaky because of auto-waiting, web-first assertions, locator retrying, test isolation, browser contexts, trace viewer, and controlled network mocking. However, bad locators, unstable test data, and hard waits can still create flaky tests.

Tips to remember
  • Tie the "why" for Playwright tests usually less flaky back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright tests usually less flaky cleanly.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Easy Common 1 minQ183 / 373

Q183.What is tracing in Playwright?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "tracing" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Tracing records detailed test execution information such as screenshots, DOM snapshots, network calls, console logs, and actions. The trace viewer helps debug failures step by step. It is very useful for CI failures because developers can inspect what happened without rerunning locally.

Tips to remember
  • Open with a one-sentence definition of tracing, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise tracing cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ184 / 373

Q184.Who should learn Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Who should learn Playwright and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

QA engineers, automation testers, SDETs, frontend developers, and test architects should learn Playwright. It is especially useful for teams working on modern web applications, CI/CD automation, and scalable test frameworks. Practice live with our AI Mock Interview or hands-on exercises in the QA Practice Hub.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Who should learn Playwright over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Who should learn Playwright cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Confidence check

If you can confidently answer the Playwright Fundamentals questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

5. Installation, Setup, and Configuration

Easy Common 1 minQ185 / 373

Q185.What files are generated during Playwright setup?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What files are generated during Playwright setup and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

A typical setup generates playwright.config.ts, a tests folder, example test files, package.json updates, and sometimes a tests-examples folder. It also installs required dependencies and browser binaries if selected during setup.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What files are generated during Playwright setup over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What files are generated during Playwright setup cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ186 / 373

Q186.What is testDir in Playwright config?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "testDir in Playwright config" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

testDir tells Playwright where test files are located. For example, testDir: './tests' means Playwright will search inside the tests folder for test files. It helps organize test suites clearly.

Tips to remember
  • Open with a one-sentence definition of testDir in Playwright config, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise testDir in Playwright config cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ187 / 373

Q187.What is timeout in Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "timeout" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Timeout defines the maximum time allowed for a test or action before it fails. Playwright supports global test timeout, expect timeout, action timeout, and navigation timeout. Proper timeout configuration helps avoid hanging tests.

Tips to remember
  • Open with a one-sentence definition of timeout, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise timeout cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ188 / 373

Q188.What are retries in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "retries" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Retries allow failed tests to run again automatically. This is commonly used in CI to reduce the impact of temporary environment issues. However, retries should not hide real flakiness; failures should still be analyzed using traces and reports.

Tips to remember
  • Open with a one-sentence definition of retries, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise retries cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Common 1 minQ189 / 373

Q189.What are workers in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "workers" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Workers are parallel processes used to run tests. Increasing workers can reduce execution time, but too many workers can overload the application or test environment. Worker count should be tuned based on infrastructure capacity.

Tips to remember
  • Open with a one-sentence definition of workers, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise workers cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ190 / 373

Q190.What are projects in Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "projects" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Projects allow the same test suite to run with different configurations. For example, one project can run tests on Chromium, another on Firefox, and another on WebKit. Projects can also represent mobile devices, roles, or environments.

Tips to remember
  • Open with a one-sentence definition of projects, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise projects cleanly.
  • Split the answer into emulator (fast feedback) vs real device (final gate) and say where each runs in your pipeline.
Easy Common 1 minQ191 / 373

Q191.What is the use option in Playwright config?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "use option in Playwright config" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

The use option defines shared settings for tests, such as browserName, baseURL, viewport, storageState, trace, screenshot, video, permissions, locale, and timezone. It avoids repeating common configuration in every test.

Tips to remember
  • Open with a one-sentence definition of use option in Playwright config, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise use option in Playwright config cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ192 / 373

Q192.What is baseURL in Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "baseURL" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

baseURL defines the base address for navigation. If baseURL is set to https://example.com, then page.goto('/login') opens https://example.com/login. It makes tests cleaner and environment switching easier.

Tips to remember
  • Open with a one-sentence definition of baseURL, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise baseURL cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ193 / 373

Q193.How do you configure reporters in Playwright?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you configure reporters" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Reporters are configured in playwright.config.ts using the reporter property. Common reporters include html, list, line, json, and junit. HTML reports are useful for local debugging, while JUnit reports are useful for CI systems.

Tips to remember
  • Walk through configure reporters as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise configure reporters cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ194 / 373

Q194.How do you configure screenshots, videos, and traces?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you configure screenshots, videos, and traces" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

They can be configured under the use section. Common settings are screenshot: 'only-on-failure', video: 'retain-on-failure', and trace: 'on-first-retry'. This keeps artifacts useful without consuming too much storage.

Tips to remember
  • Walk through configure screenshots, videos, and traces as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise configure screenshots, videos, and traces cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ195 / 373

Q195.What is globalSetup in Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "globalSetup" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

globalSetup is a function that runs once before all tests. It is often used to perform login, create authentication storage state, seed test data, or prepare the environment before test execution starts.

Tips to remember
  • Open with a one-sentence definition of globalSetup, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise globalSetup cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Common 1 minQ196 / 373

Q196.What is globalTeardown in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "globalTeardown" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

globalTeardown runs once after all tests complete. It is used to clean up test data, close external resources, or reset environment state. It is useful for maintaining a clean test environment.

Tips to remember
  • Open with a one-sentence definition of globalTeardown, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise globalTeardown cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ197 / 373

Q197.How do you handle environment variables in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you handle environment variables" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Environment variables can be read using process.env. Teams often use .env files with dotenv for local runs and CI secrets for pipelines. Sensitive values such as passwords and tokens should never be hardcoded in test code.

Tips to remember
  • Walk through handle environment variables as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle environment variables cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Common 1 minQ198 / 373

Q198.How do you run Playwright tests in headed mode?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you run Playwright tests in headed mode" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can run tests in headed mode using npx playwright test --headed. This opens the browser visibly and helps debug test behavior. Headed mode is useful during test development but not usually used in CI.

Tips to remember
  • Walk through run Playwright tests in headed mode as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise run Playwright tests in headed mode cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ199 / 373

Q199.How do you run tests in a specific browser?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you run tests in a specific browser" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can define projects in the config and run one using npx playwright test --project=chromium. This helps validate specific browser behavior without running the entire cross-browser matrix.

Tips to remember
  • Walk through run tests in a specific browser as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise run tests in a specific browser cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ200 / 373

Q200.How do you add npm scripts for Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you add npm scripts for Playwright" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can add scripts in package.json, such as "test:e2e": "playwright test", "test:headed": "playwright test --headed", and "report": "playwright show-report". Scripts make commands easier for team members and CI pipelines.

Tips to remember
  • Walk through add npm scripts for Playwright as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise add npm scripts for Playwright cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Common 1 minQ201 / 373

Q201.How does Playwright support TypeScript?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you Playwright support TypeScript" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Playwright supports TypeScript out of the box. You can write .ts test files without manual transpilation setup. TypeScript improves maintainability by catching type errors early and providing better editor support.

Tips to remember
  • Walk through Playwright support TypeScript as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright support TypeScript cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ202 / 373

Q202.How do you install Playwright browsers?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you install Playwright browsers" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can install browsers using npx playwright install. For CI environments, npx playwright install --with-deps installs browsers and required system dependencies. This is important for Linux-based build agents.

Tips to remember
  • Walk through install Playwright browsers as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise install Playwright browsers cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ203 / 373

Q203.What does fullyParallel mean in Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What does fullyParallel mean and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

fullyParallel allows tests within files to run in parallel, not just separate files. It can speed up execution but requires tests to be fully independent. Shared state must be avoided when using full parallel mode.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What does fullyParallel mean over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What does fullyParallel mean cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ204 / 373

Q204.How do you run tests using tags or grep?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you run tests using tags or grep" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Playwright supports grep and grepInvert in config or command line. Example: npx playwright test --grep @smoke. Tags help run smoke, regression, critical, or feature-specific test subsets.

Tips to remember
  • Walk through run tests using tags or grep as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise run tests using tags or grep cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ205 / 373

Q205.How do you manage different environments in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you manage different environments" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use environment variables, separate config files, or conditional baseURL values. For example, BASE_URL can point to dev, QA, staging, or production. Avoid hardcoding environment-specific URLs inside tests.

Tips to remember
  • Walk through manage different environments as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise manage different environments cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ206 / 373

Q206.What are common Playwright setup mistakes?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "common Playwright setup mistakes" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Common mistakes include hardcoding URLs, committing secrets, using too many global dependencies, not configuring traces, ignoring test isolation, using brittle selectors, and running all tests serially. A good setup should be simple, isolated, and CI-friendly.

Tips to remember
  • Open with a one-sentence definition of common Playwright setup mistakes, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise common Playwright setup mistakes cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Medium Common 1 minQ207 / 373

Q207.Write a basic Playwright test.

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Write a basic Playwright test and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

A simple Playwright test navigates to a page and verifies content. ``ts import { test, expect } from '@playwright/test'; test('homepage title should be visible', async ({ page }) => { await page.goto('/'); await expect(page.getByRole('heading')).toBeVisible(); }); `` This uses the page fixture, a relative URL, and a web-first assertion.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Write a basic Playwright test over textbook wording.
  • Be ready to whiteboard the Write a basic Playwright test snippet live — panels often ask you to type it, not describe it.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Confidence check

If you can confidently answer the Installation, Setup, and Configuration questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

6. Locators and Selectors

Easy Common 1 minQ174 / 373

Q174.What is a locator in Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "locator" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A locator is Playwright’s recommended way to find and interact with elements. Locators are lazy and retry automatically until the element is available. Examples include page.getByRole(), page.getByText(), page.getByLabel(), and page.locator().

Tips to remember
  • Open with a one-sentence definition of locator, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise locator cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ175 / 373

Q175.What is a browser context in Playwright?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "browser context" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A browser context is an isolated browser session inside a browser instance. Each context has separate cookies, local storage, session storage, and permissions. It behaves like an incognito session and helps tests run independently in parallel.

Tips to remember
  • Open with a one-sentence definition of browser context, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise browser context cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ176 / 373

Q176.Why is TypeScript popular with Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

"Why" questions on TypeScript popular with Playwright probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

TypeScript is popular because Playwright’s official runner works very well with Node.js and TypeScript. TypeScript provides type safety, better IDE support, autocomplete, fewer runtime errors, and easier maintenance for large automation frameworks.

Tips to remember
  • Tie the "why" for TypeScript popular with Playwright back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise TypeScript popular with Playwright cleanly.
  • Bring numbers: what percentage sits at unit/API/UI and how long the suite takes — strategy answers need a shape.
Easy Common 1 minQ177 / 373

Q177.Does Playwright require browser drivers like Selenium?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Does Playwright require browser drivers like Selenium and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

No. Playwright does not require separate browser drivers like ChromeDriver or GeckoDriver. It downloads and manages browser binaries automatically. This simplifies setup and avoids many driver-version mismatch issues common in Selenium projects.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Does Playwright require browser drivers like Selenium over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Does Playwright require browser drivers like Selenium cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ178 / 373

Q178.What is test isolation in Playwright?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "test isolation" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Test isolation means each test runs independently without sharing browser state such as cookies, sessions, or local storage. Playwright achieves this using browser contexts. Good isolation prevents one test from affecting another and improves reliability.

Tips to remember
  • Open with a one-sentence definition of test isolation, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test isolation cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ179 / 373

Q179.Can Playwright be used in CI/CD pipelines?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can Playwright be used in CI/CD pipelines and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Playwright is highly suitable for CI/CD pipelines. It supports headless execution, retries, parallel workers, sharding, HTML reports, JUnit reports, screenshots, videos, traces, and official Docker images. It integrates well with GitHub Actions, Jenkins, GitLab CI, and Azure DevOps.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can Playwright be used in CI/CD pipelines over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can Playwright be used in CI/CD pipelines cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ180 / 373

Q180.Is Playwright good for cross-browser testing?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Is Playwright good for cross-browser testing and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Playwright is very strong for cross-browser testing because it supports Chromium, Firefox, and WebKit with one API. Teams can define browser projects in the Playwright config and run the same test suite across multiple browsers.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Is Playwright good for cross-browser testing over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Is Playwright good for cross-browser testing cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ181 / 373

Q181.What are real-world use cases of Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "real-world use cases of Playwright" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Real-world use cases include testing login flows, checkout journeys, dashboards, admin portals, role-based access, file upload/download, email verification flows, API-driven setup, network error states, and regression suites for modern single-page applications.

Tips to remember
  • Open with a one-sentence definition of real-world use cases of Playwright, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise real-world use cases of Playwright cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ182 / 373

Q182.Why are Playwright tests usually less flaky?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

"Why" questions on Playwright tests usually less flaky probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Playwright tests are less flaky because of auto-waiting, web-first assertions, locator retrying, test isolation, browser contexts, trace viewer, and controlled network mocking. However, bad locators, unstable test data, and hard waits can still create flaky tests.

Tips to remember
  • Tie the "why" for Playwright tests usually less flaky back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright tests usually less flaky cleanly.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Easy Common 1 minQ183 / 373

Q183.What is tracing in Playwright?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "tracing" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Tracing records detailed test execution information such as screenshots, DOM snapshots, network calls, console logs, and actions. The trace viewer helps debug failures step by step. It is very useful for CI failures because developers can inspect what happened without rerunning locally.

Tips to remember
  • Open with a one-sentence definition of tracing, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise tracing cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ184 / 373

Q184.Who should learn Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Who should learn Playwright and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

QA engineers, automation testers, SDETs, frontend developers, and test architects should learn Playwright. It is especially useful for teams working on modern web applications, CI/CD automation, and scalable test frameworks. Practice live with our AI Mock Interview or hands-on exercises in the QA Practice Hub.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Who should learn Playwright over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Who should learn Playwright cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Common 1 minQ185 / 373

Q185.What files are generated during Playwright setup?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What files are generated during Playwright setup and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

A typical setup generates playwright.config.ts, a tests folder, example test files, package.json updates, and sometimes a tests-examples folder. It also installs required dependencies and browser binaries if selected during setup.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What files are generated during Playwright setup over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What files are generated during Playwright setup cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ186 / 373

Q186.What is testDir in Playwright config?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "testDir in Playwright config" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

testDir tells Playwright where test files are located. For example, testDir: './tests' means Playwright will search inside the tests folder for test files. It helps organize test suites clearly.

Tips to remember
  • Open with a one-sentence definition of testDir in Playwright config, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise testDir in Playwright config cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ187 / 373

Q187.What is timeout in Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "timeout" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Timeout defines the maximum time allowed for a test or action before it fails. Playwright supports global test timeout, expect timeout, action timeout, and navigation timeout. Proper timeout configuration helps avoid hanging tests.

Tips to remember
  • Open with a one-sentence definition of timeout, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise timeout cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ188 / 373

Q188.What are retries in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "retries" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Retries allow failed tests to run again automatically. This is commonly used in CI to reduce the impact of temporary environment issues. However, retries should not hide real flakiness; failures should still be analyzed using traces and reports.

Tips to remember
  • Open with a one-sentence definition of retries, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise retries cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Common 1 minQ189 / 373

Q189.What are workers in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "workers" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Workers are parallel processes used to run tests. Increasing workers can reduce execution time, but too many workers can overload the application or test environment. Worker count should be tuned based on infrastructure capacity.

Tips to remember
  • Open with a one-sentence definition of workers, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise workers cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ190 / 373

Q190.What are projects in Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "projects" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Projects allow the same test suite to run with different configurations. For example, one project can run tests on Chromium, another on Firefox, and another on WebKit. Projects can also represent mobile devices, roles, or environments.

Tips to remember
  • Open with a one-sentence definition of projects, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise projects cleanly.
  • Split the answer into emulator (fast feedback) vs real device (final gate) and say where each runs in your pipeline.
Easy Common 1 minQ191 / 373

Q191.What is the use option in Playwright config?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "use option in Playwright config" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

The use option defines shared settings for tests, such as browserName, baseURL, viewport, storageState, trace, screenshot, video, permissions, locale, and timezone. It avoids repeating common configuration in every test.

Tips to remember
  • Open with a one-sentence definition of use option in Playwright config, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise use option in Playwright config cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ192 / 373

Q192.What is baseURL in Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "baseURL" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

baseURL defines the base address for navigation. If baseURL is set to https://example.com, then page.goto('/login') opens https://example.com/login. It makes tests cleaner and environment switching easier.

Tips to remember
  • Open with a one-sentence definition of baseURL, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise baseURL cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ193 / 373

Q193.How do you configure reporters in Playwright?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you configure reporters" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Reporters are configured in playwright.config.ts using the reporter property. Common reporters include html, list, line, json, and junit. HTML reports are useful for local debugging, while JUnit reports are useful for CI systems.

Tips to remember
  • Walk through configure reporters as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise configure reporters cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ194 / 373

Q194.How do you configure screenshots, videos, and traces?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you configure screenshots, videos, and traces" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

They can be configured under the use section. Common settings are screenshot: 'only-on-failure', video: 'retain-on-failure', and trace: 'on-first-retry'. This keeps artifacts useful without consuming too much storage.

Tips to remember
  • Walk through configure screenshots, videos, and traces as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise configure screenshots, videos, and traces cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ195 / 373

Q195.What is globalSetup in Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "globalSetup" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

globalSetup is a function that runs once before all tests. It is often used to perform login, create authentication storage state, seed test data, or prepare the environment before test execution starts.

Tips to remember
  • Open with a one-sentence definition of globalSetup, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise globalSetup cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Common 1 minQ196 / 373

Q196.What is globalTeardown in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "globalTeardown" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

globalTeardown runs once after all tests complete. It is used to clean up test data, close external resources, or reset environment state. It is useful for maintaining a clean test environment.

Tips to remember
  • Open with a one-sentence definition of globalTeardown, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise globalTeardown cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ197 / 373

Q197.How do you handle environment variables in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you handle environment variables" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Environment variables can be read using process.env. Teams often use .env files with dotenv for local runs and CI secrets for pipelines. Sensitive values such as passwords and tokens should never be hardcoded in test code.

Tips to remember
  • Walk through handle environment variables as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle environment variables cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Common 1 minQ198 / 373

Q198.How do you run Playwright tests in headed mode?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you run Playwright tests in headed mode" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can run tests in headed mode using npx playwright test --headed. This opens the browser visibly and helps debug test behavior. Headed mode is useful during test development but not usually used in CI.

Tips to remember
  • Walk through run Playwright tests in headed mode as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise run Playwright tests in headed mode cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ199 / 373

Q199.How do you run tests in a specific browser?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you run tests in a specific browser" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can define projects in the config and run one using npx playwright test --project=chromium. This helps validate specific browser behavior without running the entire cross-browser matrix.

Tips to remember
  • Walk through run tests in a specific browser as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise run tests in a specific browser cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ200 / 373

Q200.How do you add npm scripts for Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you add npm scripts for Playwright" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can add scripts in package.json, such as "test:e2e": "playwright test", "test:headed": "playwright test --headed", and "report": "playwright show-report". Scripts make commands easier for team members and CI pipelines.

Tips to remember
  • Walk through add npm scripts for Playwright as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise add npm scripts for Playwright cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Common 1 minQ201 / 373

Q201.How does Playwright support TypeScript?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you Playwright support TypeScript" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Playwright supports TypeScript out of the box. You can write .ts test files without manual transpilation setup. TypeScript improves maintainability by catching type errors early and providing better editor support.

Tips to remember
  • Walk through Playwright support TypeScript as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright support TypeScript cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ202 / 373

Q202.How do you install Playwright browsers?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you install Playwright browsers" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can install browsers using npx playwright install. For CI environments, npx playwright install --with-deps installs browsers and required system dependencies. This is important for Linux-based build agents.

Tips to remember
  • Walk through install Playwright browsers as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise install Playwright browsers cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ203 / 373

Q203.What does fullyParallel mean in Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What does fullyParallel mean and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

fullyParallel allows tests within files to run in parallel, not just separate files. It can speed up execution but requires tests to be fully independent. Shared state must be avoided when using full parallel mode.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What does fullyParallel mean over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What does fullyParallel mean cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ204 / 373

Q204.How do you run tests using tags or grep?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you run tests using tags or grep" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Playwright supports grep and grepInvert in config or command line. Example: npx playwright test --grep @smoke. Tags help run smoke, regression, critical, or feature-specific test subsets.

Tips to remember
  • Walk through run tests using tags or grep as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise run tests using tags or grep cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ205 / 373

Q205.How do you manage different environments in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you manage different environments" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use environment variables, separate config files, or conditional baseURL values. For example, BASE_URL can point to dev, QA, staging, or production. Avoid hardcoding environment-specific URLs inside tests.

Tips to remember
  • Walk through manage different environments as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise manage different environments cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ206 / 373

Q206.What are common Playwright setup mistakes?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "common Playwright setup mistakes" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Common mistakes include hardcoding URLs, committing secrets, using too many global dependencies, not configuring traces, ignoring test isolation, using brittle selectors, and running all tests serially. A good setup should be simple, isolated, and CI-friendly.

Tips to remember
  • Open with a one-sentence definition of common Playwright setup mistakes, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise common Playwright setup mistakes cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Medium Common 1 minQ207 / 373

Q207.Write a basic Playwright test.

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Write a basic Playwright test and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

A simple Playwright test navigates to a page and verifies content. ``ts import { test, expect } from '@playwright/test'; test('homepage title should be visible', async ({ page }) => { await page.goto('/'); await expect(page.getByRole('heading')).toBeVisible(); }); `` This uses the page fixture, a relative URL, and a web-first assertion.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Write a basic Playwright test over textbook wording.
  • Be ready to whiteboard the Write a basic Playwright test snippet live — panels often ask you to type it, not describe it.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ208 / 373

Q208.What is the difference between locator and selector?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "difference between locator and selector" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A selector is a string used to identify elements, while a locator is a Playwright object that resolves elements at action time. Locators retry automatically and work better with dynamic pages. Selectors are lower-level and more brittle if overused.

Tips to remember
  • Open with a one-sentence definition of difference between locator and selector, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise difference between locator and selector cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ209 / 373

Q209.What is getByRole in Playwright?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "getByRole" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

getByRole finds elements by their accessible role, such as button, link, checkbox, or heading. It is one of the best locator strategies because it matches how users and assistive technologies understand the page.

Tips to remember
  • Open with a one-sentence definition of getByRole, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise getByRole cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ210 / 373

Q210.What is getByText in Playwright?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "getByText" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

getByText finds elements by visible text. It is useful for buttons, labels, messages, and static content. However, if text changes frequently due to localization or UI updates, role-based or test-id locators may be more stable.

Tips to remember
  • Open with a one-sentence definition of getByText, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise getByText cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ211 / 373

Q211.What is getByLabel in Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "getByLabel" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

getByLabel finds form controls using their associated label text. It is useful for inputs, checkboxes, radio buttons, and textareas. It encourages accessible HTML because labels must be properly connected to controls.

Tips to remember
  • Open with a one-sentence definition of getByLabel, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise getByLabel cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ212 / 373

Q212.What is getByPlaceholder in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "getByPlaceholder" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

getByPlaceholder finds input elements by placeholder text. It is helpful for simple forms but should not be the first choice when labels are available. Placeholder text can change often and is not always ideal for accessibility.

Tips to remember
  • Open with a one-sentence definition of getByPlaceholder, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise getByPlaceholder cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ213 / 373

Q213.What is getByTestId in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "getByTestId" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

getByTestId finds elements using a dedicated test attribute such as data-testid. It is useful when user-facing locators are unstable. Teams often use test IDs for complex components, icons, dynamic grids, and repeated elements.

Tips to remember
  • Open with a one-sentence definition of getByTestId, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise getByTestId cleanly.
  • Mention capability matrix and cost/queue trade-offs — that's the operational angle panels probe next.
Easy Common 1 minQ214 / 373

Q214.Can CSS selectors be used in Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can CSS selectors be used and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. CSS selectors can be used with page.locator('css-selector'). They are useful for technical targeting but can become brittle if tied to layout or styling classes. Prefer role, label, text, or test ID locators when possible.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can CSS selectors be used over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can CSS selectors be used cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ215 / 373

Q215.Can XPath be used in Playwright?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can XPath be used and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes, XPath can be used, but it is generally not recommended as the default locator strategy. XPath expressions are often harder to read and maintain. Use XPath only when better locator options are not available.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can XPath be used over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can XPath be used cleanly.
  • Say explicitly that you prefer CSS/relative locators and only fall back to XPath for text or axes — panels grade locator hygiene here.
Easy Common 1 minQ216 / 373

Q216.What is locator chaining?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "locator chaining" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Locator chaining means narrowing down elements step by step. For example, page.getByRole('list').getByRole('button', { name: 'Delete' }) targets a button inside a specific list. Chaining improves readability and reduces ambiguity.

Tips to remember
  • Open with a one-sentence definition of locator chaining, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise locator chaining cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ217 / 373

Q217.What is locator filtering?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "locator filtering" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Filtering narrows a locator using conditions such as hasText or has. It is useful when multiple similar elements exist. For example, a product card can be filtered by product name before clicking its Add to Cart button.

Tips to remember
  • Open with a one-sentence definition of locator filtering, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise locator filtering cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ218 / 373

Q218.What are first(), last(), and nth() in Playwright?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "first(), last(), and nth()" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

first(), last(), and nth(index) select a specific element from a list of matching elements. They are useful for repeated elements, but overuse can make tests fragile. Prefer unique user-facing locators when possible.

Tips to remember
  • Open with a one-sentence definition of first(), last(), and nth(), then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise first(), last(), and nth() cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ219 / 373

Q219.What is locator strictness?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "locator strictness" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Playwright locators are strict by default for actions. If a locator matches multiple elements and an action expects one, Playwright throws an error. This prevents accidental clicks on the wrong element and encourages precise locators.

Tips to remember
  • Open with a one-sentence definition of locator strictness, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise locator strictness cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ220 / 373

Q220.How do you handle dynamic elements in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you handle dynamic elements" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use stable locators, web-first assertions, and avoid fixed waits. Since locators retry automatically, Playwright can handle elements that appear after rendering. For dynamic lists, filter by meaningful text or test ID.

Tips to remember
  • Walk through handle dynamic elements as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle dynamic elements cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ221 / 373

Q221.Why are accessibility-first locators recommended?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

"Why" questions on accessibility-first locators recommended probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Accessibility-first locators such as getByRole and getByLabel reflect how users interact with the application. They improve test reliability and encourage accessible UI development. They are also less tied to implementation details like CSS classes.

Tips to remember
  • Tie the "why" for accessibility-first locators recommended back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise accessibility-first locators recommended cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ222 / 373

Q222.How does Playwright handle shadow DOM?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you Playwright handle shadow DOM" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Playwright’s CSS and text locators can pierce open shadow DOM by default. This makes it easier to test web components. Closed shadow DOM cannot be accessed directly because it is intentionally hidden by the browser.

Tips to remember
  • Walk through Playwright handle shadow DOM as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright handle shadow DOM cleanly.
  • Name the exact API you'd use to pierce shadow roots and mention that closed shadow roots need a test hook from developers.
Easy Common 1 minQ223 / 373

Q223.What is frameLocator?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "frameLocator" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

frameLocator is used to locate elements inside iframes. It first identifies the frame and then locates elements inside it. This is more reliable than manually switching frame references in many cases.

Tips to remember
  • Open with a one-sentence definition of frameLocator, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise frameLocator cleanly.
  • Finish by saying you always return to the default content after frame work — forgetting that is the classic failure this question hunts for.
Easy Common 1 minQ224 / 373

Q224.How do you count elements using locators?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you count elements using locators" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can use await locator.count() to get the number of matched elements. This is useful for validating tables, lists, search results, notifications, or repeated UI components.

Tips to remember
  • Walk through count elements using locators as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise count elements using locators cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ225 / 373

Q225.When should you use getByText instead of getByRole?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Timing questions like this check whether you understand the trade-offs of use getByText instead of getByRole. Interviewers want to hear the specific signals in a project that make you pick it over the alternative, plus one case where it's the wrong choice.

Detailed explanation

Use getByText when verifying static visible content or messages. Use getByRole for interactive elements such as buttons and links. Role locators are generally better for actions, while text locators are useful for content assertions.

Tips to remember
  • Answer in the form "Use use getByText instead of getByRole when …, avoid it when …" so the interviewer hears both sides in one breath.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise use getByText instead of getByRole cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ226 / 373

Q226.What are has and hasText filters?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "has and hasText filters" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

has filters a locator by another locator inside it, while hasText filters by contained text. They are useful for targeting a specific card, row, or panel based on internal content before performing an action.

Tips to remember
  • Open with a one-sentence definition of has and hasText filters, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise has and hasText filters cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ227 / 373

Q227.What is a stable locator strategy?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "stable locator strategy" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A stable locator strategy prioritizes getByRole, getByLabel, getByText, and getByTestId. Avoid fragile CSS classes, long XPath paths, and index-based locators. Good locators should survive UI refactoring and minor layout changes.

Tips to remember
  • Open with a one-sentence definition of stable locator strategy, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise stable locator strategy cleanly.
  • Say explicitly that you prefer CSS/relative locators and only fall back to XPath for text or axes — panels grade locator hygiene here.
Easy Common 1 minQ228 / 373

Q228.What are common locator anti-patterns?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "common locator anti-patterns" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Anti-patterns include using long XPath, dynamic CSS classes, nth() without context, text that changes often, and selectors based on visual layout. These make tests brittle and difficult to maintain.

Tips to remember
  • Open with a one-sentence definition of common locator anti-patterns, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise common locator anti-patterns cleanly.
  • Say explicitly that you prefer CSS/relative locators and only fall back to XPath for text or axes — panels grade locator hygiene here.
Easy Common 1 minQ229 / 373

Q229.Why should long XPath be avoided?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

"Why" questions on should long XPath be avoided probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Long XPath depends heavily on DOM structure. Even small layout changes can break tests. Playwright provides better locator options that are more readable, user-focused, and reliable for modern applications.

Tips to remember
  • Tie the "why" for should long XPath be avoided back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise should long XPath be avoided cleanly.
  • Say explicitly that you prefer CSS/relative locators and only fall back to XPath for text or axes — panels grade locator hygiene here.
Easy Common 1 minQ230 / 373

Q230.How do you customize the test ID attribute?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you customize the test ID attribute" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can configure Playwright to use a custom test ID attribute. For example, testIdAttribute: 'data-qa' makes getByTestId use data-qa. This helps align Playwright with an existing frontend testing convention.

Tips to remember
  • Walk through customize the test ID attribute as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise customize the test ID attribute cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Common 1 minQ231 / 373

Q231.Give an example of good locator usage.

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Give an example of good locator usage and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Good locator usage targets elements like a user would. ``ts await page.getByRole('button', { name: 'Login' }).click(); await page.getByLabel('Email').fill('qa@example.com'); await expect(page.getByText('Welcome')).toBeVisible(); `` These locators are readable and stable.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Give an example of good locator usage over textbook wording.
  • Be ready to whiteboard the Give an example of good locator usage snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Confidence check

If you can confidently answer the Locators and Selectors questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

7. Actions, Assertions, and Auto-Waiting

Easy Common 1 minQ232 / 373

Q232.How do you click an element in Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you click an element" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use locator.click(). Playwright automatically waits for the element to be visible, stable, enabled, and able to receive events before clicking. Example: await page.getByRole('button', { name: 'Submit' }).click();

Tips to remember
  • Walk through click an element as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise click an element cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ233 / 373

Q233.What is the difference between fill and type?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "difference between fill and type" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

fill clears an input and sets the provided value instantly. type simulates typing character by character and can include delay. For most form automation, fill is faster and more reliable. Use type when keyboard behavior must be tested.

Tips to remember
  • Open with a one-sentence definition of difference between fill and type, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise difference between fill and type cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ234 / 373

Q234.How do you press keyboard keys in Playwright?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you press keyboard keys" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use locator.press() or page.keyboard.press(). Example: await page.getByLabel('Search').press('Enter'). This is useful for search boxes, shortcuts, form submission, and keyboard accessibility testing.

Tips to remember
  • Walk through press keyboard keys as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise press keyboard keys cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ235 / 373

Q235.How do you handle checkboxes and radio buttons?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you handle checkboxes and radio buttons" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use check(), uncheck(), and setChecked(). These methods wait for actionability and verify the final state. They are better than clicking manually because they express the test intention clearly.

Tips to remember
  • Walk through handle checkboxes and radio buttons as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle checkboxes and radio buttons cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ236 / 373

Q236.How do you select dropdown values?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you select dropdown values" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use selectOption() for native select elements. You can select by value, label, or index. For custom dropdowns, interact with visible buttons and options using locators, just like a real user.

Tips to remember
  • Walk through select dropdown values as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise select dropdown values cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ237 / 373

Q237.How do you upload files in Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you upload files" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use setInputFiles() on a file input locator. Example: await page.getByLabel('Upload').setInputFiles('tests/fixtures/resume.pdf'). For hidden file inputs, target the input[type=file] element directly.

Tips to remember
  • Walk through upload files as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise upload files cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ238 / 373

Q238.How do you hover over an element?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you hover over an element" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use locator.hover(). Hover is useful for testing menus, tooltips, dropdowns, and hover-based UI states. Avoid relying heavily on hover for critical flows unless the product requires it.

Tips to remember
  • Walk through hover over an element as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise hover over an element cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ239 / 373

Q239.How do you perform drag and drop in Playwright?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you perform drag and drop" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use locator.dragTo(targetLocator). It supports common drag-and-drop scenarios. For complex custom implementations, you may need lower-level mouse actions or JavaScript-based event simulation.

Tips to remember
  • Walk through perform drag and drop as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise perform drag and drop cleanly.
  • Explain how you test asynchronous flows (polling, consumer assertions, timeouts) rather than treating it as a sync call.
Easy Common 1 minQ240 / 373

Q240.How do you use keyboard actions?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you use keyboard actions" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.keyboard for low-level keyboard input. It supports down, up, press, insertText, and typing. Keyboard actions are useful for shortcuts, accessibility checks, and rich text editors.

Tips to remember
  • Walk through use keyboard actions as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise use keyboard actions cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ241 / 373

Q241.How do you use mouse actions?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you use mouse actions" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.mouse for low-level mouse control such as move, down, up, and click at coordinates. It is useful for canvas testing or complex drag interactions, but locator-based actions are preferred for normal UI.

Tips to remember
  • Walk through use mouse actions as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise use mouse actions cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ242 / 373

Q242.What is auto-waiting for actions?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "auto-waiting for actions" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Before actions such as click or fill, Playwright waits until the element is actionable. This means the element must be attached, visible, stable, enabled, and ready to receive input. This reduces timing-related flakiness.

Tips to remember
  • Open with a one-sentence definition of auto-waiting for actions, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise auto-waiting for actions cleanly.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
Easy Common 1 minQ243 / 373

Q243.What are actionability checks?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "actionability checks" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Actionability checks are conditions Playwright verifies before performing an action. These include visibility, stability, enabled state, attachment to DOM, and whether the element receives events. They ensure Playwright acts like a real user.

Tips to remember
  • Open with a one-sentence definition of actionability checks, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise actionability checks cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ244 / 373

Q244.What are assertions in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "assertions" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Assertions verify expected application behavior. Playwright provides expect assertions such as toBeVisible, toHaveText, toHaveURL, toBeEnabled, and toHaveCount. These assertions retry automatically until timeout.

Tips to remember
  • Open with a one-sentence definition of assertions, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise assertions cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ245 / 373

Q245.What are web-first assertions?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "web-first assertions" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Web-first assertions are Playwright assertions designed for dynamic web pages. They automatically retry until the expected condition becomes true or timeout occurs. Example: await expect(locator).toBeVisible();

Tips to remember
  • Open with a one-sentence definition of web-first assertions, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise web-first assertions cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ246 / 373

Q246.What are soft assertions?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "soft assertions" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Soft assertions allow a test to continue even if an assertion fails. They are useful when collecting multiple validation failures in one test. Use expect.soft() carefully because too many soft failures can make test results harder to interpret.

Tips to remember
  • Open with a one-sentence definition of soft assertions, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise soft assertions cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ247 / 373

Q247.What is expect.poll?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "expect.poll" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

expect.poll repeatedly executes a function until the expected result is reached. It is useful for checking backend state, delayed UI updates, queues, or asynchronous business processes that are not tied to a single DOM element.

Tips to remember
  • Open with a one-sentence definition of expect.poll, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise expect.poll cleanly.
  • Explain how you test asynchronous flows (polling, consumer assertions, timeouts) rather than treating it as a sync call.
Easy Common 1 minQ248 / 373

Q248.What is expect.toPass?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "expect.toPass" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

expect.toPass retries a block of assertions until all pass or timeout occurs. It is useful for complex conditions involving multiple checks, such as API status plus UI state validation.

Tips to remember
  • Open with a one-sentence definition of expect.toPass, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise expect.toPass cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Confidence check

If you can confidently answer the Actions, Assertions, and Auto-Waiting questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

8. Fixtures, Hooks, and Test Runner

Easy Common 1 minQ249 / 373

Q249.What is test.describe?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "test.describe" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

test.describe groups related tests. It improves readability and allows scoped hooks, annotations, and configuration. For example, all checkout tests can be grouped under test.describe('Checkout').

Tips to remember
  • Open with a one-sentence definition of test.describe, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test.describe cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ250 / 373

Q250.What is test.step?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "test.step" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

test.step divides a test into named steps. These steps appear in reports and traces, making debugging easier. It is helpful for long scenario-based tests.

Tips to remember
  • Open with a one-sentence definition of test.step, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test.step cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ251 / 373

Q251.What are annotations in Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "annotations" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Annotations add metadata to tests. Built-in annotations include skip, fixme, fail, slow, and only. Custom annotations can also be used for reporting and filtering.

Tips to remember
  • Open with a one-sentence definition of annotations, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise annotations cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Common 1 minQ252 / 373

Q252.How do tags work in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you How do tags work" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Tags are usually added in test titles or annotations, such as @smoke or @regression. They allow selective execution using grep. Tags are useful for organizing large test suites.

Tips to remember
  • Walk through How do tags work as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How do tags work cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ253 / 373

Q253.What is test.skip?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "test.skip" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

test.skip skips a test or group of tests. It can be unconditional or conditional. Use it when a test is not applicable for a browser, environment, or feature flag.

Tips to remember
  • Open with a one-sentence definition of test.skip, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test.skip cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ254 / 373

Q254.What is test.fixme?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "test.fixme" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

test.fixme marks a test as known broken or incomplete. It documents technical debt while preventing the failure from breaking the pipeline. It should be tracked and resolved.

Tips to remember
  • Open with a one-sentence definition of test.fixme, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test.fixme cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Common 1 minQ255 / 373

Q255.What is test.only?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "test.only" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

test.only runs only selected tests. It is useful during local debugging but should never be committed. CI pipelines should fail if test.only is accidentally present.

Tips to remember
  • Open with a one-sentence definition of test.only, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test.only cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Common 1 minQ256 / 373

Q256.What is test.slow?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "test.slow" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

test.slow triples the default timeout for a test. It is useful for genuinely slow flows, but should not be used to hide performance issues or poor synchronization.

Tips to remember
  • Open with a one-sentence definition of test.slow, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test.slow cleanly.
  • Use percentiles (P90/P95) and a concrete SLA rather than averages — averages hide the failures interviewers care about.
Easy Common 1 minQ257 / 373

Q257.How do retries work in Playwright Test?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you How do retries work in Playwright Test" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Retries rerun failed tests based on config or command-line settings. They are useful in CI, but repeated failures should be investigated with traces. A passing retry may still indicate flaky behavior.

Tips to remember
  • Walk through How do retries work in Playwright Test as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How do retries work in Playwright Test cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Common 1 minQ258 / 373

Q258.How does parallel execution work?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you parallel execution work" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Playwright runs test files in parallel by default using workers. It can also run tests within a file in parallel if fullyParallel is enabled. Tests must be independent for safe parallel execution.

Tips to remember
  • Walk through parallel execution work as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise parallel execution work cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ259 / 373

Q259.What is serial mode?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "serial mode" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Serial mode runs tests in order within a describe block. It is useful for dependent flows, but should be avoided for most test suites because it reduces parallelism and can create dependencies.

Tips to remember
  • Open with a one-sentence definition of serial mode, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise serial mode cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Common 1 minQ260 / 373

Q260.What is sharding in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "sharding" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Sharding splits tests across multiple machines or CI jobs. Example: --shard=1/3 runs the first third of tests. It helps scale large suites and reduce pipeline duration.

Tips to remember
  • Open with a one-sentence definition of sharding, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise sharding cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Common 1 minQ261 / 373

Q261.What are project dependencies?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "project dependencies" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Project dependencies allow one project to run before another. They are useful for setup projects, such as authentication setup before running browser tests.

Tips to remember
  • Open with a one-sentence definition of project dependencies, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise project dependencies cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Common 1 minQ262 / 373

Q262.Can fixtures be overridden?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can fixtures be overridden and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Playwright fixtures can be extended or overridden using test.extend(). This allows teams to customize page, context, storageState, or custom services for specific test needs.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can fixtures be overridden over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can fixtures be overridden cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ263 / 373

Q263.How do fixtures work with Page Object Model?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you How do fixtures work with Page Object Model" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Fixtures can instantiate page objects and inject them into tests. This keeps tests clean and avoids repeatedly creating page object instances in every test file.

Tips to remember
  • Walk through How do fixtures work with Page Object Model as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How do fixtures work with Page Object Model cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Medium Common 1 minQ264 / 373

Q264.Give an example of a custom fixture.

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Give an example of a custom fixture and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Example: ``ts import { test as base } from '@playwright/test'; import { LoginPage } from './pages/LoginPage'; export const test = base.extend<{ loginPage: LoginPage }>({ loginPage: async ({ page }, use) => { await use(new LoginPage(page)); } }); `` This provides LoginPage directly to tests.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Give an example of a custom fixture over textbook wording.
  • Be ready to whiteboard the Give an example of a custom fixture snippet live — panels often ask you to type it, not describe it.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Confidence check

If you can confidently answer the Fixtures, Hooks, and Test Runner questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

9. Playwright API Testing and Network Handling

Easy Common 1 minQ265 / 373

Q265.What is APIRequestContext?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "APIRequestContext" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

APIRequestContext is Playwright’s API client for making HTTP requests in tests. It supports GET, POST, PUT, PATCH, DELETE, headers, authentication, cookies, and response assertions. It is useful for API testing and test data setup. See the official Playwright API testing docs and our API testing interview questions for more practice.

Tips to remember
  • Open with a one-sentence definition of APIRequestContext, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise APIRequestContext cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Common 1 minQ266 / 373

Q266.How do you send a GET request?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you send a GET request" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use request.get(url). Example: const response = await request.get('/api/users'). Then assert response.ok(), status code, headers, or JSON body. GET requests are commonly used for validation.

Tips to remember
  • Walk through send a GET request as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise send a GET request cleanly.
  • Assert status, schema and business payload — naming all three signals you test contracts, not just happy paths.
Easy Common 1 minQ267 / 373

Q267.How do you send a POST request?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you send a POST request" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use request.post(url, { data }). POST is commonly used to create resources, login through API, or prepare test data. Always assert status code and response body after creation.

Tips to remember
  • Walk through send a POST request as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise send a POST request cleanly.
  • Assert status, schema and business payload — naming all three signals you test contracts, not just happy paths.
Easy Common 1 minQ268 / 373

Q268.What is the difference between PUT and PATCH?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "difference between PUT and PATCH" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

PUT usually replaces the entire resource, while PATCH updates specific fields. In tests, verify both status code and final resource state. Also validate idempotency and behavior when required fields are missing.

Tips to remember
  • Open with a one-sentence definition of difference between PUT and PATCH, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise difference between PUT and PATCH cleanly.
  • Assert status, schema and business payload — naming all three signals you test contracts, not just happy paths.
Easy Common 1 minQ269 / 373

Q269.How do you test DELETE APIs?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you test DELETE APIs" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Send a DELETE request and verify the status code, response body, and that the resource no longer exists. Also test deleting an already deleted or unauthorized resource.

Tips to remember
  • Walk through test DELETE APIs as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test DELETE APIs cleanly.
  • Assert status, schema and business payload — naming all three signals you test contracts, not just happy paths.
Easy Common 1 minQ270 / 373

Q270.How do you assert API responses in Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you assert API responses" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use expect(response.status()).toBe(200), expect(response.ok()).toBeTruthy(), and validate JSON response fields. For schema validation, integrate libraries like Zod, Ajv, or custom validators.

Tips to remember
  • Walk through assert API responses as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise assert API responses cleanly.
  • Tie contract checks to the consumer/provider workflow and where the contract is stored — that's the senior detail panels wait for.
Easy Common 1 minQ271 / 373

Q271.How do you handle authentication tokens in API tests?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you handle authentication tokens in API tests" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Obtain the token through login API or CI secrets, then pass it in headers such as Authorization: Bearer token. Avoid hardcoding tokens. Refresh or regenerate tokens when they expire.

Tips to remember
  • Walk through handle authentication tokens in API tests as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle authentication tokens in API tests cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Common 1 minQ272 / 373

Q272.What is a hybrid UI and API test?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "hybrid UI and API test" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A hybrid test uses APIs for setup or validation and UI for user-critical flows. For example, create a user through API, log in through UI, and verify dashboard behavior. This makes tests faster and more reliable.

Tips to remember
  • Open with a one-sentence definition of hybrid UI and API test, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise hybrid UI and API test cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Common 1 minQ273 / 373

Q273.What is page.route?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "page.route" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

page.route intercepts network requests matching a URL or pattern. It can mock responses, block requests, or modify outgoing requests. It is useful for testing edge cases without depending on real backend behavior.

Tips to remember
  • Open with a one-sentence definition of page.route, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise page.route cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Common 1 minQ274 / 373

Q274.What is route.fulfill?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "route.fulfill" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

route.fulfill completes an intercepted request with a mocked response. You can return status, headers, body, or JSON. It is useful for testing empty states, error states, and predictable API responses.

Tips to remember
  • Open with a one-sentence definition of route.fulfill, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise route.fulfill cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Common 1 minQ275 / 373

Q275.What is route.abort?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "route.abort" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

route.abort cancels an intercepted request. It is useful for simulating network failures, blocked resources, timeout scenarios, or unavailable third-party services.

Tips to remember
  • Open with a one-sentence definition of route.abort, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise route.abort cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Common 1 minQ276 / 373

Q276.What is route.continue?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "route.continue" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

route.continue allows an intercepted request to continue to the server, optionally with modified headers, method, or post data. It is useful for adding test headers or modifying requests.

Tips to remember
  • Open with a one-sentence definition of route.continue, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise route.continue cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Common 1 minQ277 / 373

Q277.How do you listen to request events?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you listen to request events" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.on('request', callback). This helps inspect outgoing network requests, verify tracking calls, debug API calls, or ensure certain resources are requested.

Tips to remember
  • Walk through listen to request events as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise listen to request events cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Common 1 minQ278 / 373

Q278.How do you listen to response events?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you listen to response events" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.on('response', callback). This helps validate status codes, inspect API responses, or debug failed backend calls during UI tests.

Tips to remember
  • Walk through listen to response events as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise listen to response events cleanly.
  • Assert status, schema and business payload — naming all three signals you test contracts, not just happy paths.
Easy Common 1 minQ279 / 373

Q279.How do you mock APIs in Playwright?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you mock APIs" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.route to intercept the API endpoint and route.fulfill with mock data. Mocking APIs makes tests deterministic and allows validation of rare states like server errors or empty results.

Tips to remember
  • Walk through mock APIs as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise mock APIs cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Occasional 1 minQ280 / 373

Q280.What is HAR replay in Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "HAR replay" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

HAR replay allows Playwright to serve network responses from a recorded HAR file. It can make tests more deterministic by replaying known backend responses. It is useful for demos, offline testing, and stable regression flows.

Tips to remember
  • Open with a one-sentence definition of HAR replay, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise HAR replay cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ281 / 373

Q281.Can Playwright test slow networks?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can Playwright test slow networks and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Playwright can simulate network behavior by routing requests, delaying responses, or using browser context options and CDP for Chromium-specific throttling. Testing slow networks helps validate loaders, retries, and timeout handling.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can Playwright test slow networks over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can Playwright test slow networks cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ282 / 373

Q282.How do you test API error states in UI?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you test API error states in UI" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Mock the API response using route.fulfill with status codes like 400, 401, 403, or 500. Then verify that the UI shows correct error messages, retry options, or fallback behavior.

Tips to remember
  • Walk through test API error states in UI as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test API error states in UI cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Occasional 1 minQ283 / 373

Q283.How do you test GraphQL with Playwright?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you test GraphQL with Playwright" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

GraphQL requests usually go to one endpoint. Validate operationName, variables, response data, and errors. You can intercept GraphQL requests and return mocked responses for specific operations.

Tips to remember
  • Walk through test GraphQL with Playwright as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test GraphQL with Playwright cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Occasional 1 minQ284 / 373

Q284.What is contract-style validation?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "contract-style validation" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Contract-style validation checks whether API responses follow expected structure, types, and required fields. It does not replace full contract testing tools, but it helps catch breaking API changes during UI or API automation.

Tips to remember
  • Open with a one-sentence definition of contract-style validation, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise contract-style validation cleanly.
  • Tie contract checks to the consumer/provider workflow and where the contract is stored — that's the senior detail panels wait for.
Easy Occasional 1 minQ285 / 373

Q285.How do you test pagination APIs?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you test pagination APIs" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Verify page size, total count, next/previous tokens, sorting consistency, empty pages, invalid page numbers, and combined filters. For cursor pagination, verify that records do not duplicate or disappear across pages.

Tips to remember
  • Walk through test pagination APIs as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test pagination APIs cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Occasional 1 minQ286 / 373

Q286.How can APIs help with test setup?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you How can APIs help with test setup" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

APIs can create users, orders, products, permissions, or test records faster than UI steps. This keeps UI tests focused on user behavior instead of long setup flows.

Tips to remember
  • Walk through How can APIs help with test setup as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How can APIs help with test setup cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Occasional 1 minQ287 / 373

Q287.How can APIs help with cleanup?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you How can APIs help with cleanup" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

APIs can delete test-created records after execution. Cleanup prevents test data pollution and reduces environment instability. Always design cleanup to be safe and idempotent.

Tips to remember
  • Walk through How can APIs help with cleanup as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How can APIs help with cleanup cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ288 / 373

Q288.Can Playwright share cookies between UI and API tests?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can Playwright share cookies between UI and API tests and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. APIRequestContext can share cookie storage with browser context depending on how it is created. This allows login through API and later validation through UI, or vice versa.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can Playwright share cookies between UI and API tests over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can Playwright share cookies between UI and API tests cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ289 / 373

Q289.How do you retry API assertions?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you retry API assertions" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use expect.poll or a custom retry loop when backend state is eventually consistent. Avoid blind waits. Retry meaningful conditions such as order status becoming completed.

Tips to remember
  • Walk through retry API assertions as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise retry API assertions cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ290 / 373

Q290.How do you configure API request timeout?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you configure API request timeout" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Timeouts can be passed in request options or configured globally. Proper API timeouts prevent tests from hanging and make failures easier to diagnose.

Tips to remember
  • Walk through configure API request timeout as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise configure API request timeout cleanly.
  • Explain how you test asynchronous flows (polling, consumer assertions, timeouts) rather than treating it as a sync call.
Easy Occasional 1 minQ291 / 373

Q291.How do you verify response headers?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you verify response headers" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Read headers using response.headers() and assert expected values such as content-type, cache-control, location, or security headers. Header validation is important for API correctness and security.

Tips to remember
  • Walk through verify response headers as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise verify response headers cleanly.
  • Reference the specific OWASP category and the check you automate for it, not "we do security testing".
Easy Occasional 1 minQ292 / 373

Q292.How do you test security-related network behavior?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you test security-related network behavior" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Validate authentication, authorization, secure headers, HTTPS usage, token handling, and blocked unauthorized requests. Playwright can inspect UI requests and API responses to detect security regressions.

Tips to remember
  • Walk through test security-related network behavior as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test security-related network behavior cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Medium Occasional 1 minQ293 / 373

Q293.Give an example of API testing in Playwright.

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Give an example of API testing and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Example: ``ts test('create user through API', async ({ request }) => { const response = await request.post('/api/users', { data: { name: 'QA User', email: 'qa@example.com' } }); expect(response.status()).toBe(201); const body = await response.json(); expect(body.email).toBe('qa@example.com'); }); `` This validates API creation directly.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Give an example of API testing over textbook wording.
  • Be ready to whiteboard the Give an example of API testing snippet live — panels often ask you to type it, not describe it.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Confidence check

If you can confidently answer the Playwright API Testing and Network Handling questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

10. Authentication and Test Data Management

Easy Occasional 1 minQ294 / 373

Q294.How do you automate login in Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you automate login" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

You can automate login through UI steps or API calls. For most large suites, login once using global setup and save storageState. This avoids repeated login and reduces execution time.

Tips to remember
  • Walk through automate login as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise automate login cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Occasional 1 minQ295 / 373

Q295.How do you avoid repeated login in every test?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you avoid repeated login in every test" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use storageState. Login once, save authentication state to a JSON file, and configure tests to reuse it. This keeps tests faster and avoids failures caused by repeated login flow dependencies.

Tips to remember
  • Walk through avoid repeated login in every test as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise avoid repeated login in every test cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Occasional 1 minQ296 / 373

Q296.What is storageState authentication?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "storageState authentication" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

storageState authentication means saving cookies and localStorage after login and reusing them in future tests. It is useful when tests need an already authenticated user session.

Tips to remember
  • Open with a one-sentence definition of storageState authentication, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise storageState authentication cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Occasional 1 minQ297 / 373

Q297.How does global setup authentication work?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you global setup authentication work" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

globalSetup runs before tests, logs in a user, saves storageState, and then tests use that saved state. This creates a clean and reusable authentication flow for CI and local execution.

Tips to remember
  • Walk through global setup authentication work as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise global setup authentication work cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Occasional 1 minQ298 / 373

Q298.How do you test multiple user roles?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you test multiple user roles" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Create separate storageState files for each role, such as admin, manager, and viewer. Configure projects or fixtures to use the correct role. This supports role-based access testing.

Tips to remember
  • Walk through test multiple user roles as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test multiple user roles cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Occasional 1 minQ299 / 373

Q299.What is a good test data setup strategy?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "good test data setup strategy" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

A good strategy creates only the data needed for each test, uses unique identifiers, avoids shared mutable data, and cleans up after execution. API-based setup is often faster than UI-based setup.

Tips to remember
  • Open with a one-sentence definition of good test data setup strategy, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise good test data setup strategy cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Occasional 1 minQ300 / 373

Q300.Why is test data cleanup important?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

"Why" questions on test data cleanup important probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Cleanup prevents polluted environments, false failures, duplicate records, and unpredictable test results. Cleanup should be reliable, idempotent, and safe even if a test fails halfway.

Tips to remember
  • Tie the "why" for test data cleanup important back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test data cleanup important cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ301 / 373

Q301.Why create test data using APIs?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

"Why" questions on create test data using APIs probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

API setup is faster and more stable than UI setup. It lets UI tests focus on the actual user journey being validated. For example, create an order through API and verify it in the UI.

Tips to remember
  • Tie the "why" for create test data using APIs back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise create test data using APIs cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Occasional 1 minQ302 / 373

Q302.How do you manage database test data?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you manage database test data" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use controlled seed data, test-specific records, transactions, or cleanup jobs. Direct database manipulation should be used carefully because it can bypass business rules. API setup is often safer.

Tips to remember
  • Walk through manage database test data as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise manage database test data cleanly.
  • Say how you clean up or roll back the data you touch — DB questions are really data-hygiene questions.
Easy Occasional 1 minQ303 / 373

Q303.How do you create unique test data?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you create unique test data" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use timestamps, UUIDs, worker indexes, or random suffixes. Unique test data prevents conflicts during parallel execution and avoids failures caused by duplicate emails, usernames, or order IDs.

Tips to remember
  • Walk through create unique test data as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise create unique test data cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Occasional 1 minQ304 / 373

Q304.What is data-driven testing?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "data-driven testing" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Data-driven testing runs the same test logic with different input values. In Playwright, data can come from arrays, JSON files, CSV files, or external sources. It improves coverage without duplicating test code.

Tips to remember
  • Open with a one-sentence definition of data-driven testing, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise data-driven testing cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ305 / 373

Q305.How do you use JSON test data?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you use JSON test data" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Store data in JSON files and import it into tests. JSON is useful for structured test data such as users, products, roles, and expected messages. Keep sensitive data out of committed JSON files.

Tips to remember
  • Walk through use JSON test data as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise use JSON test data cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ306 / 373

Q306.How do you use CSV test data?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you use CSV test data" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

CSV can be parsed using Node.js libraries when tabular test data is needed. It is useful for large input combinations, but JSON is usually easier for nested data structures.

Tips to remember
  • Walk through use CSV test data as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise use CSV test data cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ307 / 373

Q307.How do you manage environment-specific test data?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you manage environment-specific test data" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use environment variables and configuration files to separate dev, QA, staging, and production data. Avoid using production-sensitive data in automated tests unless tests are read-only and approved.

Tips to remember
  • Walk through manage environment-specific test data as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise manage environment-specific test data cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ308 / 373

Q308.How do you manage secrets in Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you manage secrets" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use CI secret stores, environment variables, or secret management tools. Do not commit passwords, tokens, or API keys. Locally, use .env files excluded from version control.

Tips to remember
  • Walk through manage secrets as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise manage secrets cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Occasional 1 minQ309 / 373

Q309.How do you handle OTP in automation?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you handle OTP in automation" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Prefer test-only OTP bypasses, API access to retrieve OTP, static OTP in lower environments, or mocked authentication providers. Avoid relying on real SMS or email delivery in automated regression tests.

Tips to remember
  • Walk through handle OTP in automation as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle OTP in automation cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Occasional 1 minQ310 / 373

Q310.How do you handle CAPTCHA in Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you handle CAPTCHA" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

CAPTCHA should not be automated directly. Use test environment bypasses, feature flags, or mock verification services. CAPTCHA is designed to stop automation, so testing should focus on integration and fallback behavior.

Tips to remember
  • Walk through handle CAPTCHA as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle CAPTCHA cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Occasional 1 minQ311 / 373

Q311.What are test data anti-patterns?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "test data anti-patterns" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Anti-patterns include shared users for all tests, hardcoded data, no cleanup, dependency on production data, manual preconditions, and tests that must run in a specific order. These cause flaky and unreliable suites.

Tips to remember
  • Open with a one-sentence definition of test data anti-patterns, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test data anti-patterns cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Occasional 1 minQ312 / 373

Q312.What is seed data?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "seed data" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Seed data is predefined data loaded into an environment before tests. It is useful for reference values such as roles, categories, plans, and permissions. Seed data should be stable and version-controlled.

Tips to remember
  • Open with a one-sentence definition of seed data, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise seed data cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ313 / 373

Q313.How do you avoid data conflicts in parallel tests?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you avoid data conflicts in parallel tests" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use unique data per worker or test, avoid shared mutable records, and clean up created data. Playwright provides workerInfo, which can help generate worker-specific users or data identifiers. CTA after Q200: Ready to practice these Playwright answers in a real interview format? Try AI Mock Interview → /ai-mock-interview Start Free → /login

Tips to remember
  • Walk through avoid data conflicts in parallel tests as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise avoid data conflicts in parallel tests cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Occasional 1 minQ314 / 373

Q314.How do you handle expired authentication state?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you handle expired authentication state" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

If storageState expires, regenerate it in global setup. Tests should not rely on old authentication files forever. In CI, create fresh storage state for each run to avoid token expiry failures.

Tips to remember
  • Walk through handle expired authentication state as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle expired authentication state cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Occasional 1 minQ315 / 373

Q315.How do you design role-based access tests?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you design role-based access tests" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Define expected permissions for each role and validate allowed and blocked actions. Use separate users or storageState files for each role. Test both UI visibility and backend authorization where possible.

Tips to remember
  • Walk through design role-based access tests as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise design role-based access tests cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Occasional 1 minQ316 / 373

Q316.How do you test negative authentication scenarios?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you test negative authentication scenarios" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Test invalid password, locked account, expired token, missing token, wrong role, and direct URL access without login. Negative authentication tests should verify both error messages and blocked access.

Tips to remember
  • Walk through test negative authentication scenarios as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test negative authentication scenarios cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Occasional 1 minQ317 / 373

Q317.What if cleanup fails after a test?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What if cleanup fails after a test and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Cleanup should be retried or handled by scheduled cleanup jobs using unique test identifiers. Tests should log created data to make manual cleanup easier. Cleanup failure should be visible, not silently ignored.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What if cleanup fails after a test over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What if cleanup fails after a test cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Medium Occasional 1 minQ318 / 373

Q318.Give an example of storageState setup.

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Give an example of storageState setup and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Example: ``ts const browser = await chromium.launch(); const page = await browser.newPage(); await page.goto('/login'); await page.getByLabel('Email').fill(process.env.USER_EMAIL!); await page.getByLabel('Password').fill(process.env.USER_PASSWORD!); await page.getByRole('button', { name: 'Login' }).click(); await page.context().storageState({ path: 'auth/user.json' }); await browser.close(); `` Tests can reuse auth/user.json.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Give an example of storageState setup over textbook wording.
  • Be ready to whiteboard the Give an example of storageState setup snippet live — panels often ask you to type it, not describe it.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Confidence check

If you can confidently answer the Authentication and Test Data Management questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

11. Debugging, Tracing, Screenshots, Videos, and Reports

Easy Occasional 1 minQ319 / 373

Q319.What is Playwright Inspector?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "Playwright Inspector" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Playwright Inspector is a debugging tool that lets you step through tests, inspect locators, view actions, and pause execution. It is useful for developing and fixing tests locally.

Tips to remember
  • Open with a one-sentence definition of Playwright Inspector, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright Inspector cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ320 / 373

Q320.What is PWDEBUG?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "PWDEBUG" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

PWDEBUG is an environment variable used to run Playwright in debug mode. Example: PWDEBUG=1 npx playwright test. It opens the inspector and runs tests in headed mode with slower execution.

Tips to remember
  • Open with a one-sentence definition of PWDEBUG, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise PWDEBUG cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ321 / 373

Q321.What is Playwright codegen?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Interviewers open with "Playwright codegen" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Codegen records user actions and generates Playwright test code. It is useful for learning selectors and quickly creating draft tests. However, generated code should be reviewed and refactored before production use.

Tips to remember
  • Open with a one-sentence definition of Playwright codegen, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright codegen cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ322 / 373

Q322.What is Trace Viewer?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Interviewers open with "Trace Viewer" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Trace Viewer is a Playwright tool for analyzing test execution. It shows actions, screenshots, DOM snapshots, console logs, network calls, and errors. It is one of the best tools for debugging CI failures.

Tips to remember
  • Open with a one-sentence definition of Trace Viewer, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Trace Viewer cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Occasional 1 minQ323 / 373

Q323.How do you enable traces?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you enable traces" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Traces can be enabled in config using trace: 'on', 'retain-on-failure', or 'on-first-retry'. A common CI setting is trace: 'on-first-retry' because it captures useful data without storing traces for every passed test.

Tips to remember
  • Walk through enable traces as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise enable traces cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Occasional 1 minQ324 / 373

Q324.How do you capture screenshots?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you capture screenshots" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use page.screenshot() manually or configure screenshot: 'only-on-failure'. Screenshots help understand UI state at failure time and are useful in reports.

Tips to remember
  • Walk through capture screenshots as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise capture screenshots cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Occasional 1 minQ325 / 373

Q325.How do you record videos?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you record videos" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Videos can be enabled using video: 'on', 'retain-on-failure', or 'off'. Video recording is useful for debugging complex UI flows but can increase storage usage in CI.

Tips to remember
  • Walk through record videos as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise record videos cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Confidence check

If you can confidently answer the Debugging, Tracing, Screenshots, Videos, and Reports questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

12. Playwright Framework Design and Page Object Model

Easy Occasional 1 minQ326 / 373

Q326.How should errors be handled in a framework?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on How should errors be handled in a framework and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Let Playwright assertions fail naturally with clear messages. Add custom error messages only where they improve debugging. Avoid catching errors and hiding failures unless cleanup or logging is required.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on How should errors be handled in a framework over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How should errors be handled in a framework cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ327 / 373

Q327.How do you onboard new team members to a Playwright framework?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you onboard new team members to a Playwright framework" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Provide setup instructions, folder structure, coding standards, locator strategy, test data rules, sample tests, and CI instructions. A strong README and example test help new members become productive quickly.

Tips to remember
  • Walk through onboard new team members to a Playwright framework as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise onboard new team members to a Playwright framework cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Medium Occasional 1 minQ328 / 373

Q328.Give an example of a Page Object Model class.

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Give an example of a Page Object Model class and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Example: ``ts export class LoginPage { constructor(private page: Page) {} email = this.page.getByLabel('Email'); password = this.page.getByLabel('Password'); loginButton = this.page.getByRole('button', { name: 'Login' }); async login(email: string, password: string) { await this.email.fill(email); await this.password.fill(password); await this.loginButton.click(); } } `` This keeps login logic reusable.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Give an example of a Page Object Model class over textbook wording.
  • Be ready to whiteboard the Give an example of a Page Object Model class snippet live — panels often ask you to type it, not describe it.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Confidence check

If you can confidently answer the Playwright Framework Design and Page Object Model questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

13. CI/CD, Docker, Parallel Execution, and Cloud Grid

Easy Occasional 1 minQ329 / 373

Q329.How do you run Playwright in GitHub Actions?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you run Playwright in GitHub Actions" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Install dependencies, install browsers, run npx playwright test, and upload reports as artifacts. Playwright provides good CI documentation and works well with GitHub-hosted runners.

Tips to remember
  • Walk through run Playwright in GitHub Actions as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise run Playwright in GitHub Actions cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Occasional 1 minQ330 / 373

Q330.How do you run Playwright in Jenkins?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you run Playwright in Jenkins" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Create a pipeline that checks out code, installs Node dependencies, installs Playwright browsers, runs tests, and publishes HTML or JUnit reports. Store credentials in Jenkins credentials, not code.

Tips to remember
  • Walk through run Playwright in Jenkins as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise run Playwright in Jenkins cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Occasional 1 minQ331 / 373

Q331.How do you run Playwright in Azure DevOps?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you run Playwright in Azure DevOps" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use a YAML pipeline with Node setup, npm ci, npx playwright install --with-deps, and npx playwright test. Publish test results and artifacts using Azure DevOps publishing tasks.

Tips to remember
  • Walk through run Playwright in Azure DevOps as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise run Playwright in Azure DevOps cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Occasional 1 minQ332 / 373

Q332.How do you run Playwright in GitLab CI?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you run Playwright in GitLab CI" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use a GitLab CI YAML file with a Playwright Docker image or Node image. Install dependencies, run tests, and save reports, traces, and screenshots as artifacts.

Tips to remember
  • Walk through run Playwright in GitLab CI as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise run Playwright in GitLab CI cleanly.
  • Mention pinned browser images and cleanup of containers between runs — panels look for CI cost awareness.
Easy Occasional 1 minQ333 / 373

Q333.Why use Docker for Playwright?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

"Why" questions on use Docker for Playwright probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Docker provides a consistent runtime environment with browsers, dependencies, and OS libraries. It reduces “works on my machine” problems and makes CI execution more predictable.

Tips to remember
  • Tie the "why" for use Docker for Playwright back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise use Docker for Playwright cleanly.
  • Mention pinned browser images and cleanup of containers between runs — panels look for CI cost awareness.
Easy Occasional 1 minQ334 / 373

Q334.What are Playwright Docker images?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Interviewers open with "Playwright Docker images" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Playwright provides official Docker images containing browsers and required system dependencies. They simplify CI setup and avoid dependency issues on Linux agents.

Tips to remember
  • Open with a one-sentence definition of Playwright Docker images, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright Docker images cleanly.
  • Mention pinned browser images and cleanup of containers between runs — panels look for CI cost awareness.
Easy Occasional 1 minQ335 / 373

Q335.Why is browser installation important in CI?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

"Why" questions on browser installation important in CI probe your reasoning, not your memory. Strong candidates connect the choice to a business or reliability outcome — flaky tests, slower feedback loop, or missed defects — instead of parroting a rule.

Detailed explanation

Playwright browsers must be installed before tests run. In Linux CI, system dependencies may also be required. Using npx playwright install --with-deps or official Docker images solves this.

Tips to remember
  • Tie the "why" for browser installation important in CI back to a measurable outcome — flake rate, execution time, defect leakage — instead of an opinion.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise browser installation important in CI cleanly.
  • Mention pinned browser images and cleanup of containers between runs — panels look for CI cost awareness.
Easy Occasional 1 minQ336 / 373

Q336.What should be cached in CI?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What should be cached in CI and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Cache npm dependencies where appropriate, but be careful with browser cache compatibility. Many teams use npm ci for clean reproducible installs. Browser caching can speed pipelines but must be managed carefully.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What should be cached in CI over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What should be cached in CI cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Occasional 1 minQ337 / 373

Q337.Should retries be enabled in CI?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Should retries be enabled in CI and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes, limited retries such as 1 or 2 are common in CI. However, retries should not hide flaky tests. Use traces and dashboards to track tests that pass only after retry.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Should retries be enabled in CI over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Should retries be enabled in CI cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Occasional 1 minQ338 / 373

Q338.How do workers affect CI execution?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you How do workers affect CI execution" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Workers control parallelism. More workers can reduce runtime, but too many can overload the application under test or CI machine. Tune workers based on CPU, memory, and environment capacity.

Tips to remember
  • Walk through How do workers affect CI execution as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise How do workers affect CI execution cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Occasional 1 minQ339 / 373

Q339.What is sharding in CI?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "sharding in CI" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Sharding splits tests across multiple CI jobs. For example, four jobs can each run one-fourth of the suite. This is useful for large regression suites where one machine would take too long.

Tips to remember
  • Open with a one-sentence definition of sharding in CI, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise sharding in CI cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ340 / 373

Q340.What is test splitting?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Interviewers open with "test splitting" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Test splitting divides tests by files, tags, historical duration, or shards. It helps balance workload across CI jobs and reduce total pipeline time.

Tips to remember
  • Open with a one-sentence definition of test splitting, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test splitting cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Occasional 1 minQ341 / 373

Q341.What is flaky test quarantine?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Interviewers open with "flaky test quarantine" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Quarantine means separating unstable tests from blocking pipelines while they are investigated. It prevents unreliable tests from stopping releases but should be temporary and tracked.

Tips to remember
  • Open with a one-sentence definition of flaky test quarantine, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise flaky test quarantine cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Occasional 1 minQ342 / 373

Q342.Can Playwright run on BrowserStack?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can Playwright run on BrowserStack and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Playwright can run on BrowserStack for cloud browser testing. This helps validate real browser and platform combinations beyond local or CI-provided browsers.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can Playwright run on BrowserStack over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can Playwright run on BrowserStack cleanly.
  • Mention capability matrix and cost/queue trade-offs — that's the operational angle panels probe next.
Easy Occasional 1 minQ343 / 373

Q343.Can Playwright run on Sauce Labs or LambdaTest?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can Playwright run on Sauce Labs or LambdaTest and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Cloud testing providers such as Sauce Labs and LambdaTest support Playwright execution. They are useful for cross-platform coverage, browser versions, and enterprise reporting needs.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can Playwright run on Sauce Labs or LambdaTest over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can Playwright run on Sauce Labs or LambdaTest cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Occasional 1 minQ344 / 373

Q344.What artifacts should be uploaded in CI?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What artifacts should be uploaded in CI and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Upload HTML reports, JUnit XML, traces, screenshots, videos, and logs. These artifacts help debug failures without rerunning tests locally.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What artifacts should be uploaded in CI over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What artifacts should be uploaded in CI cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Occasional 1 minQ345 / 373

Q345.How do you optimize Playwright pipelines?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you optimize Playwright pipelines" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use API setup, storageState authentication, parallel workers, sharding, selective tags, test impact analysis, efficient locators, and reduced unnecessary waits. Keep smoke tests fast and regression tests scalable.

Tips to remember
  • Walk through optimize Playwright pipelines as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise optimize Playwright pipelines cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Occasional 1 minQ346 / 373

Q346.How do you manage secrets in CI?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you manage secrets in CI" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use CI secret storage such as GitHub Secrets, Jenkins Credentials, GitLab Variables, or Azure Key Vault. Never print secrets in logs or commit them to repositories.

Tips to remember
  • Walk through manage secrets in CI as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise manage secrets in CI cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Occasional 1 minQ347 / 373

Q347.What is fail-fast strategy?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Interviewers open with "fail-fast strategy" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Fail-fast stops execution early when critical failures occur. It is useful for smoke pipelines but less useful for full regression where teams want complete failure visibility.

Tips to remember
  • Open with a one-sentence definition of fail-fast strategy, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise fail-fast strategy cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Medium Occasional 1 minQ348 / 373

Q348.Give an example GitHub Actions workflow.

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Give an example GitHub Actions workflow and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Example: ``yaml name: Playwright Tests on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - run: npm ci - run: npx playwright install --with-deps - run: npx playwright test - uses: actions/upload-artifact@v4 if: always() with: name: playwright-report path: playwright-report/ `` This runs tests and uploads reports.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Give an example GitHub Actions workflow over textbook wording.
  • Be ready to whiteboard the Give an example GitHub Actions workflow snippet live — panels often ask you to type it, not describe it.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Confidence check

If you can confidently answer the CI/CD, Docker, Parallel Execution, and Cloud Grid questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

14. Advanced, Scenario-Based, and Senior-Level Playwright Questions

Medium Occasional 1 minQ349 / 373

Q349.How would you design a Playwright framework from scratch?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you design a Playwright framework from scratch" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Start with clear folder structure, Playwright config, TypeScript, fixtures, page objects, API clients, data builders, reporting, and CI integration. Prioritize test isolation, stable locators, storageState authentication, and parallel execution from the beginning. For a complete implementation, follow our Playwright framework setup with TypeScript guide.

Tips to remember
  • Walk through design a Playwright framework from scratch as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise design a Playwright framework from scratch cleanly.
  • Add one sentence on what does NOT belong in a page object (assertions, test data) — that boundary is what separates mid from senior answers.
Easy Occasional 1 minQ350 / 373

Q350.How would you migrate from Selenium to Playwright?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you migrate from Selenium to Playwright" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Do not blindly convert every Selenium test. First identify high-value stable flows, design a Playwright framework, migrate smoke tests, compare execution time and flakiness, then gradually migrate regression coverage. Keep Selenium running during transition if needed.

Tips to remember
  • Walk through migrate from Selenium to Playwright as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise migrate from Selenium to Playwright cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Occasional 1 minQ351 / 373

Q351.What are risks in Selenium to Playwright migration?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Interviewers open with "risks in Selenium to Playwright migration" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

Risks include rewriting too many tests at once, copying bad locator strategies, ignoring framework design, underestimating training needs, and losing historical coverage. A phased migration with clear priorities works best.

Tips to remember
  • Open with a one-sentence definition of risks in Selenium to Playwright migration, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise risks in Selenium to Playwright migration cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ352 / 373

Q352.How do you test micro-frontend applications?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you test micro-frontend applications" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Test critical user journeys across micro-frontends, validate integration points, mock unstable services when needed, and use contract tests for boundaries. Avoid tying tests to internal implementation of each micro-frontend.

Tips to remember
  • Walk through test micro-frontend applications as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test micro-frontend applications cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Occasional 1 minQ353 / 373

Q353.How do you test highly dynamic applications?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you test highly dynamic applications" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use stable user-facing locators, wait for meaningful business states, validate API responses when needed, and avoid hard waits. Dynamic apps require strong test data control and clear synchronization points.

Tips to remember
  • Walk through test highly dynamic applications as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test highly dynamic applications cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ354 / 373

Q354.How do you test role-based access control?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you test role-based access control" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Create users for each role, verify visible and hidden UI actions, test direct URL access, and validate backend authorization through APIs. Do not rely only on UI visibility because security must be enforced server-side.

Tips to remember
  • Walk through test role-based access control as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test role-based access control cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Easy Occasional 1 minQ355 / 373

Q355.How do you test third-party integrations?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you test third-party integrations" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Mock third-party services for most automated tests and keep a small number of integration tests against sandbox environments. This balances reliability, cost, and confidence.

Tips to remember
  • Walk through test third-party integrations as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test third-party integrations cleanly.
  • Say when you'd mock versus hit the real dependency; unconditional mocking is a red flag for integration coverage.
Easy Occasional 1 minQ356 / 373

Q356.How do you avoid brittle tests?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you avoid brittle tests" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use stable locators, avoid layout-based selectors, keep tests independent, use API setup, write clear assertions, avoid excessive abstraction, and review tests like production code.

Tips to remember
  • Walk through avoid brittle tests as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise avoid brittle tests cleanly.
  • Explain setup/teardown ordering and what runs per-test vs per-suite; ordering mistakes are the follow-up question.
Easy Occasional 1 minQ357 / 373

Q357.How would you improve a flaky Playwright suite?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

Hands-on "how would you improve a flaky Playwright suite" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Collect failure data, identify top flaky tests, inspect traces, fix locator and data issues, remove hard waits, isolate shared state, improve environment stability, and track retry-based passes. Fixing flakiness should be systematic.

Tips to remember
  • Walk through improve a flaky Playwright suite as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise improve a flaky Playwright suite cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Occasional 1 minQ358 / 373

Q358.How do you choose the best locator?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you choose the best locator" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Prefer getByRole, getByLabel, and getByText for user-facing elements. Use getByTestId for complex or unstable UI. Avoid long XPath and CSS tied to styling. A good locator is readable and resilient.

Tips to remember
  • Walk through choose the best locator as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise choose the best locator cleanly.
  • Say explicitly that you prefer CSS/relative locators and only fall back to XPath for text or axes — panels grade locator hygiene here.
Easy Occasional 1 minQ359 / 373

Q359.How do you debug production-only failures?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you debug production-only failures" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Compare environment data, feature flags, browser versions, permissions, network responses, third-party services, and user roles. Use traces, logs, and safe read-only tests. Avoid destructive automation in production.

Tips to remember
  • Walk through debug production-only failures as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise debug production-only failures cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Occasional 1 minQ360 / 373

Q360.What is the test pyramid?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Interviewers open with "test pyramid" to confirm you can define the concept in one crisp line before going deeper. In Playwright rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.

Detailed explanation

The test pyramid recommends many unit tests, fewer API/integration tests, and fewer UI end-to-end tests. Playwright is powerful for UI and API tests, but not every scenario should be automated through the UI.

Tips to remember
  • Open with a one-sentence definition of test pyramid, then a concrete Playwright example — never start with history or theory.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test pyramid cleanly.
  • Bring numbers: what percentage sits at unit/API/UI and how long the suite takes — strategy answers need a shape.
Easy Occasional 1 minQ361 / 373

Q361.How do you balance API and UI automation?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you balance API and UI automation" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use API tests for business rules, data validation, and fast coverage. Use UI tests for critical user journeys and visual workflow validation. Combine both for efficient and reliable automation.

Tips to remember
  • Walk through balance API and UI automation as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise balance API and UI automation cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ362 / 373

Q362.How do you track flaky tests over time?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you track flaky tests over time" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use CI history, retry data, failure categories, dashboards, and test annotations. Track whether failures are due to product bugs, environment issues, test data, or automation code. Prioritize the most frequent blockers.

Tips to remember
  • Walk through track flaky tests over time as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise track flaky tests over time cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Occasional 1 minQ363 / 373

Q363.How do you manage Playwright tests in a monorepo?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you manage Playwright tests in a monorepo" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Keep shared utilities in common packages, define project-specific configs, use tags or paths for selective execution, and avoid cross-team coupling. CI should run only impacted tests where possible.

Tips to remember
  • Walk through manage Playwright tests in a monorepo as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise manage Playwright tests in a monorepo cleanly.
  • Tie contract checks to the consumer/provider workflow and where the contract is stored — that's the senior detail panels wait for.
Easy Occasional 1 minQ364 / 373

Q364.How do you approach visual testing with Playwright?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

Hands-on "how would you approach visual testing with Playwright" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use screenshot comparisons for stable UI components and critical pages. Control fonts, viewport, browser, animations, and data. Visual testing is valuable but requires careful baseline management to avoid noisy failures.

Tips to remember
  • Walk through approach visual testing with Playwright as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise approach visual testing with Playwright cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Occasional 1 minQ365 / 373

Q365.Can Playwright help with accessibility testing?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on Can Playwright help with accessibility testing and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Yes. Playwright can validate keyboard navigation, ARIA roles, labels, focus behavior, and integrate with tools like axe-core. Accessibility-first locators also encourage better accessible UI design.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on Can Playwright help with accessibility testing over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Can Playwright help with accessibility testing cleanly.
  • Mention auto-waiting, user-facing locators, or trace viewer — one of those three usually earns a follow-up.
Easy Occasional 1 minQ366 / 373

Q366.How do you handle test data in parallel senior-level frameworks?

Asked byStripeMicrosoftAdobeNetflix
Why interviewers ask this

Hands-on "how would you handle test data in parallel senior-level frameworks" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use worker-specific users, unique identifiers, API setup, isolated records, and cleanup strategies. Avoid shared mutable data. Parallel-safe test data is essential for fast and reliable enterprise automation.

Tips to remember
  • Walk through handle test data in parallel senior-level frameworks as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise handle test data in parallel senior-level frameworks cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Occasional 1 minQ367 / 373

Q367.How does contract testing relate to Playwright?

Asked byNetflixGoogleAirbnbShopify
Why interviewers ask this

Hands-on "how would you contract testing relate to Playwright" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Playwright can validate API response shapes, but dedicated contract testing tools are better for formal consumer-provider contracts. Use Playwright for UI/API confidence and contract tests for service compatibility.

Tips to remember
  • Walk through contract testing relate to Playwright as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise contract testing relate to Playwright cleanly.
  • Tie contract checks to the consumer/provider workflow and where the contract is stored — that's the senior detail panels wait for.
Easy Occasional 1 minQ368 / 373

Q368.How do you test mobile behavior with Playwright?

Asked byAdobeNetflixGoogleAirbnb
Why interviewers ask this

Hands-on "how would you test mobile behavior with Playwright" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Use device emulation for viewport, user agent, touch, and mobile layout validation. For real mobile browser behavior, complement emulation with device cloud testing when required.

Tips to remember
  • Walk through test mobile behavior with Playwright as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise test mobile behavior with Playwright cleanly.
  • Split the answer into emulator (fast feedback) vs real device (final gate) and say where each runs in your pipeline.
Easy Occasional 1 minQ369 / 373

Q369.How do you consider performance in Playwright tests?

Asked byAirbnbShopifyUberStripe
Why interviewers ask this

Hands-on "how would you consider performance in Playwright tests" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Avoid unnecessary UI setup, hard waits, repeated login, and oversized scenarios. Use API setup, parallel execution, storageState, and focused assertions. Tests should be fast enough to provide feedback in CI.

Tips to remember
  • Walk through consider performance in Playwright tests as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise consider performance in Playwright tests cleanly.
  • Call out test isolation and shared-state risk (data, sessions, ports) before you talk about worker counts.
Easy Occasional 1 minQ370 / 373

Q370.How do you define team standards for Playwright?

Asked byGoogleAirbnbShopifyUber
Why interviewers ask this

Hands-on "how would you define team standards for Playwright" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Create standards for locator strategy, folder structure, naming, test data, assertions, tagging, code review, CI artifacts, and flaky test handling. Document them and enforce through reviews and examples.

Tips to remember
  • Walk through define team standards for Playwright as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise define team standards for Playwright cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Easy Occasional 1 minQ371 / 373

Q371.How do you measure automation ROI?

Asked byUberStripeMicrosoftAdobe
Why interviewers ask this

Hands-on "how would you measure automation ROI" questions reveal whether you've actually shipped Playwright code or only read about it. Interviewers listen for concrete steps, the tools you'd reach for first, and the failure mode you'd guard against.

Detailed explanation

Measure reduced manual regression time, faster release feedback, defect detection, pipeline stability, test maintenance effort, and confidence in critical flows. ROI is not just number of tests; it is useful feedback.

Tips to remember
  • Walk through measure automation ROI as numbered steps and call out the tool, command, or API used at each step.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise measure automation ROI cleanly.
  • Describe the pipeline stage order and what makes the build fail — a vague "we run tests in CI" answer stalls here.
Easy Occasional 1 minQ372 / 373

Q372.What should a senior SDET emphasize in a Playwright interview?

Asked byShopifyUberStripeMicrosoft
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What should a senior SDET emphasize in a Playwright interview and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

A senior SDET should discuss framework design, test strategy, CI/CD, parallel execution, flakiness management, API/UI balance, maintainability, team standards, and business risk coverage. Senior answers should explain trade-offs, not just syntax.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What should a senior SDET emphasize in a Playwright interview over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What should a senior SDET emphasize in a Playwright interview cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Medium Occasional 1 minQ373 / 373

Q373.What roadmap would you suggest for adopting Playwright in a team?

Asked byMicrosoftAdobeNetflixGoogle
Why interviewers ask this

This Playwright question checks whether you can go beyond textbook knowledge on What roadmap would you suggest for adopting Playwright in a team and reason about it the way a working QA engineer does — with a definition, an example, and the edge case that usually comes up next.

Detailed explanation

Start with training and proof of concept, automate critical smoke flows, design framework standards, integrate CI, add API setup, migrate high-value tests, monitor flakiness, and expand regression coverage gradually. Adoption should be practical, measurable, and team-friendly. For a production-ready blueprint, see our Playwright framework setup with TypeScript guide.

Tips to remember
  • Anchor the answer in a real Playwright project — panels reward specificity on What roadmap would you suggest for adopting Playwright in a team over textbook wording.
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise What roadmap would you suggest for adopting Playwright in a team cleanly.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Confidence check

If you can confidently answer the Advanced, Scenario-Based, and Senior-Level Playwright Questions questions above, you're well prepared for this section of your interview. Move on, or rehearse the trickier ones aloud with our AI mock interviewer.

Quick revision

  1. Q1: What is Playwright — Playwright is an open-source test automation library built by Microsoft.
  2. Q2: How is Playwright different from Selenium — Dimension Playwright Selenium Auto-wait Native Manual (explicit waits) Languages TS, JS, Python, Java, .NET Java, C#, Python, Ruby, JS Multi-tab Yes Yes Browser install npx playwri
  3. Q3: How do you install Playwright — npm init -y npm install -D @playwright/test npx playwright install --with-deps chromium firefox webkit
  4. Q4: What is `page` in Playwright — page is a fixture provided by @playwright/test representing a single browser tab.
  5. Q5: What is a `locator` — A locator is a query for an element that re-evaluates every time it's used.

Frequently asked questions

1.Is Playwright good for freshers?
Yes. Playwright is a good tool for freshers because it has clean syntax, strong documentation, and modern automation features. Freshers should learn basic TypeScript or JavaScript, locators, assertions, auto-waiting, and simple test structure.
2.Is Playwright better than Selenium?
Playwright is often better for new modern web automation projects because it has auto-waiting, tracing, network mocking, and easier setup. Selenium is still valuable for legacy frameworks and wide ecosystem support.
3.Which language is best for Playwright interviews?
TypeScript is the best choice for most Playwright interviews because Playwright Test is very strong in the Node.js ecosystem. However, Python, Java, and .NET are also supported.
4.How many days are enough to prepare Playwright?
For basics, 7 to 10 days may be enough. For experienced SDET interviews, 3 to 4 weeks of practice is better because framework design, CI/CD, API testing, and debugging are also asked.
5.Do I need TypeScript for Playwright interviews?
TypeScript is highly recommended, especially for SDET roles. You do not need advanced TypeScript, but you should understand async/await, types, imports, classes, and basic project structure.
6.What are the most asked Playwright topics?
The most asked topics are locators, auto-waiting, assertions, browser contexts, fixtures, storageState authentication, API testing, network mocking, tracing, CI/CD, and Playwright vs Selenium.
7.Can Playwright be used for API testing?
Yes. Playwright includes APIRequestContext and the request fixture for API testing. It can test REST APIs, create test data, validate responses, and combine API setup with UI tests.
8.How should I practice Playwright interview answers?
Practice by writing real tests, explaining why you use locators and auto-waiting, debugging failures with traces, and doing mock interviews. Use SoftwareTestPilot’s AI Mock Interview to rehearse answers in an interview format.
9.What is the salary for a Playwright fresher in 2026?
US: $75k–$105k. India: ₹5L–₹12L. UK: £30k–£45k. See our QA Salary Guide for the full breakdown.
10.Should I learn Playwright or Selenium first?
Learn Playwright if you're targeting greenfield projects or JS shops. Learn Selenium if you need cross-language support or enterprise breadth.
11.Do I need TypeScript to use Playwright?
No — Playwright works with plain JavaScript, Python, Java, and .NET. TypeScript is recommended for type safety but optional.
12.Where can I practice Playwright?
Build a small Todo app and test every interaction. The Sauce Labs demo app (saucedemo.com) is also a great open practice target.
13.What is the typical interview process for a Freshers / Entry-Level Microsoft Playwright & TypeScript professional?
The interview process for a Freshers / Entry-Level professional specializing in Microsoft Playwright & TypeScript typically begins with a recruiter screening, followed by a 45-minute technical deep dive into core language syntax and system design. Candidates then undergo a live coding or code review round where they solve debugging scenarios and build modular automation components under strict time limits.
14.What salary should a Freshers / Entry-Level Junior E2E Automation Tester expect in 2026?
In North American tech hubs, a Freshers / Entry-Level Junior E2E Automation Tester commands base salary bands reflecting enterprise demand. In Indian R&D centers (Bangalore, Pune, Hyderabad), compensation packages typically include competitive base CTC paired with performance bonuses and equity incentives.

Was this article helpful?

Cluster · QA Career

More from QA Interview Questions

Behavioral, framework, coding — full interview prep.

Pillar guide · 11 articles
More in this cluster
From the QA Career pillar
Topic mapConcepts · Tools · People · Standards

Related concepts, tools & standards around Playwright

A quick reference of the people, companies, frameworks and technologies most often mentioned alongside Playwright in real QA teams — useful when you're mapping a learning path, preparing for interviews, or scoping a new project.

Core testing concepts
Prompt Engineering for QALLM-Assisted Test GenerationTest PyramidShift-Left TestingBehavior-Driven DevelopmentTest-Driven DevelopmentPage Object ModelContract TestingExploratory TestingRisk-Based Testing
Testing tools
Programming languages
JavaPythonJavaScriptTypeScriptC#SQL
DevOps & CI/CD
Certifications worth knowing
ISTQB Foundation LevelISTQB Advanced — Test AnalystISTQB Agile TesterCertified Selenium ProfessionalAWS Certified DevOps EngineerCertified ScrumMaster (CSM)
Companies hiring for this skill
GoogleMicrosoftAmazonMetaNetflixAtlassianThoughtWorksInfosysTCSWipro

Key takeaways

  • Master the fundamentals before tackling advanced Playwright scenarios.
  • Always explain trade-offs — interviewers reward judgement, not memorisation.
  • Use real project examples; generic answers blend in.
  • Practice answers out loud — written prep doesn't transfer to live rounds.
  • Revise the 30-second cheat sheet the night before your interview.
  • Keep one strong scenario story ready for every section above.

Playwright automation jobs hiring now

Live, indexable Playwright openings — updated daily in Jobs Radar.

Browse all QA jobs on Jobs Radar

Loading current openings…

Home