SoftwareTestPilot
Pillar Guide · 27 Q&A · Architecture Diagram

Playwright vs Selenium Interview Questions (2026)

The pillar guide. 27 real head-to-head Playwright vs Selenium interview questions with a WebSocket vs JSON Wire Protocol architecture diagram, senior-SDET answers, comparison tables, and side-by-side code — architecture, auto-wait, locators, parallelism, network interception, tracing, migration strategy, and framework-choice scenarios.

  • 7 min read
  • Difficulty: Mixed (Medium → Hard)
  • 2+ yrs · SDET / Automation Lead
  • Updated July 2026
  • Avinash Kamble
Avinash Kamble
Founder & QA Engineer at SoftwareTestPilot
Published:
0 / 27 reviewed
0%

1. Core Differences

Easy Very Common 1 minQ1 / 27

Q1.Playwright vs Selenium — what's the 30-second answer?

Asked byAccentureInfosysCognizantWipro
Why interviewers ask this

Comparison questions like this test whether you understand Playwright vs Selenium — what's the 30-second answer at a design level — not just that both exist, but when to pick one over the other. Panels use it to see if you can defend a trade-off with a real project example.

Detailed explanation

Playwright is the modern, faster, TypeScript-first framework with native auto-wait, parallel-by-default execution, and trace viewer. Selenium is the mature, cross-language W3C-standard tool with the biggest install base and enterprise footprint. In 2026: pick Playwright for greenfield, Selenium for existing Java/Grid shops.

Tips to remember
  • Structure the answer as a small table in your head: dimension, option A, option B — and close with "I'd pick X when Y".
  • Keep the answer to 60–90 seconds; anything longer signals you can't summarise Playwright vs Selenium — what's the 30-second answer cleanly.
  • State that you never mix wait strategies and never use a hard sleep, then give the timeout value you actually run in CI.
RelatedQ3
Medium Very Common 1 minQ2 / 27

Q2.Which is faster?

Asked byMicrosoftAccentureInfosysCognizant
Why interviewers ask this

Listing questions on Which is faster 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 — often 2–5x on the same suite. Reasons: single WebSocket connection per browser (vs HTTP-per-command for WebDriver), workers run tests in parallel by default, and auto-wait eliminates dead sleeps.

Tips to remember
  • Group the items into 2–3 categories before listing — panels remember structure, not raw counts.
  • Be ready to whiteboard the Which is faster 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.
Easy Very Common 1 minQ3 / 27

Q3.Which supports more languages?

Asked byCognizantWiproAmazonCapgemini
Why interviewers ask this

Listing questions on Which supports more languages 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

Selenium: Java, Python, C#, Ruby, JavaScript, Kotlin. Playwright: TypeScript/JavaScript, Python, Java, .NET. Selenium wins on Ruby; Playwright wins on TypeScript ergonomics.

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 supports more languages cleanly.
Easy Very Common 1 minQ4 / 27

Q4.Which supports more browsers?

Asked byInfosysCognizantWiproAmazon
Why interviewers ask this

Listing questions on Which supports more browsers 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
BrowserSeleniumPlaywright
Chrome / EdgeYesYes (bundled Chromium)
FirefoxYesYes (bundled)
SafariYes (SafariDriver)WebKit engine (not Safari itself)
IE 11Yes (legacy)No
Mobile emulationBasicRich device profiles
Tips to remember
  • Group the items into 2–3 categories before listing — panels remember structure, not raw counts.
  • Rebuild the Which supports more browsers comparison table from memory before the interview — panels probe the least-used row.
  • Split the answer into emulator (fast feedback) vs real device (final gate) and say where each runs in your pipeline.
Medium Very Common 1 minQ5 / 27

Q5.Which one auto-waits?

Asked byAmazonCapgeminiTCSMicrosoft
Why interviewers ask this

Listing questions on Which one auto-waits 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 — every action waits for visible + stable + enabled + receiving-events before firing. Selenium requires explicit waits (WebDriverWait + ExpectedConditions).

Tips to remember
  • Group the items into 2–3 categories before listing — panels remember structure, not raw counts.
  • Be ready to whiteboard the Which one auto-waits 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 minQ6 / 27

Q6.Which handles multi-tab / multi-window better?

Asked byWiproAmazonCapgeminiTCS
Why interviewers ask this

Listing questions on Which handles multi-tab / multi-window better 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 — first-class BrowserContext and page.context().pages(). Selenium supports it via getWindowHandles(), but the API is more verbose and less isolated.

Tips to remember
  • Group the items into 2–3 categories before listing — panels remember structure, not raw counts.
  • Be ready to whiteboard the Which handles multi-tab / multi-window better snippet live — panels often ask you to type it, not describe it.
Confidence check

If you can confidently answer the Core Differences 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. Architecture & Setup (Pillar)

Hard Very Common 2 minQ7 / 27

Q7.Explain the architecture difference (with diagram).

Asked byTCSMicrosoftAccentureInfosys
Why interviewers ask this

Open-ended "explain architecture difference (with diagram)" 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

The single biggest architectural gap between the two frameworks is how the test process talks to the browser. Selenium sends one HTTP request per command over the JSON Wire / W3C WebDriver protocol. Playwright opens a single, persistent WebSocket connection using a CDP-derived protocol and streams every command and event through it.

SELENIUM — JSON Wire / W3C WebDriver over HTTP One HTTP round-trip per command · stateless · high per-action latency Test Script Java / Python / C# Browser Driver chromedriver.exe / geckodriver Browser Chrome / Firefox POST /session/../element POST /session/../click native driver call ~20–40 ms per command · 800 commands ≈ 16–32 s pure protocol overhead TCP + TLS handshake per request unless keep-alive; stateless — session id on every call. PLAYWRIGHT — Single WebSocket (CDP-derived, bidirectional) One persistent duplex connection · streams commands + events · low latency Test Script TS / JS / Py / .NET Playwright Driver bundled server process Browser Chromium / WebKit / FF WebSocket · JSON-RPC CDP / patched ~1–3 ms per command · 800 commands ≈ 0.8–2.4 s pure protocol overhead One handshake, then binary WS frames; server can push events (dialog, request, console) without polling.
Fig. 1 — Selenium JSON Wire vs Playwright WebSocket architecture. Same 800-command suite, 10–20× lower protocol overhead.
AspectSelenium (JSON Wire / W3C)Playwright (WebSocket / CDP)
TransportHTTP/1.1 (JSON body)WebSocket (binary frames, JSON-RPC)
Connection lifetimePer-command request/responseOne persistent duplex socket per browser
DirectionalityClient → Driver only (polling)Full duplex — browser pushes events
Session stateStateless; session id on every URLStateful; connection is the session
Per-command latency~20–40 ms (handshake + parse)~1–3 ms (single frame)
Auto-wait / eventsClient polls with WebDriverWaitServer streams frame.navigated, request, dialog
Extra binary neededchromedriver / geckodriverNone — driver is bundled npm package

Real-world takeaway: on a 500-test regression, the transport alone accounts for a meaningful chunk of runtime. WebSocket also unlocks features Selenium can only bolt on later (network interception, tracing, dialog handlers) because the browser can push events without the client asking.

Tips to remember
  • Use a 3-part frame for architecture difference (with diagram): what it is → how it works → one gotcha you've hit in a real Playwright vs Selenium project.
  • Be ready to whiteboard the architecture difference (with diagram) 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.
Hard Very Common 2 minQ8 / 27

Q8.WebSocket vs JSON Wire Protocol — why does one connection beat many?

Asked byCapgeminiTCSMicrosoftAccenture
Why interviewers ask this

Comparison questions like this test whether you understand WebSocket vs JSON Wire Protocol — why does one connection beat many at a design level — not just that both exist, but when to pick one over the other. Panels use it to see if you can defend a trade-off with a real project example.

Detailed explanation

The JSON Wire Protocol (now the W3C WebDriver spec) was designed in 2011 to be a REST-like RPC on top of HTTP. Every action — findElement, click, getAttribute — is a separate HTTP call to http://localhost:PORT/session/<id>/<action>. WebSocket, born in RFC 6455, is a persistent full-duplex tunnel: after one handshake the client and server can push frames both ways.

HTTP · JSON Wire (Selenium) 3-way TCP handshake + TLS + request + response per command 1. SYN, SYN-ACK, ACK 2. TLS ClientHello / ServerHello 3. POST /session/.../element 4. Response 200 {value: ...} 5. Connection close (or keep-alive) 6. Repeat 1–5 for the next command... Overhead per command: 20–40 ms Server cannot push · client must poll for state WebSocket · CDP (Playwright) One handshake, then binary frames both directions forever 1. HTTP GET Upgrade: websocket 2. 101 Switching Protocols 3. → frame {id:1, method:"Page.navigate"} 4. ← frame {id:1, result:{...}} 5. ← frame {method:"Network.requestWillBeSent"} 6. → frame {id:2, method:"Runtime.evaluate"} Overhead per command: 1–3 ms Server pushes events — auto-wait for free
Fig. 2 — Cost of connection. HTTP pays the handshake tax every command; WebSocket pays it once.

Why this matters in an interview answer:

  • Latency compounds. A UI test can fire 50–200 protocol calls per scenario. Multiply by suite size × CI runs per day and JSON Wire's per-call overhead becomes the pipeline's biggest hidden cost.
  • Event push kills polling. Playwright can subscribe to Network.responseReceived or Page.dialog and act the instant the browser fires them. Selenium has to loop with WebDriverWait, which is where most flakiness starts.
  • Backpressure & ordering. A single WS with monotonically increasing id preserves command order per browser context. HTTP concurrency has to be serialised in the driver, which is why Selenium WebElement references can go stale.
  • Firewalls. WS runs over the same 80/443 as HTTP and passes through most corporate proxies — the myth that WebSocket is blocked in the enterprise is largely gone in 2026.

If an interviewer probes deeper, mention that Selenium 4 can use BiDi (also WebSocket-based) for a subset of features — proof that the industry direction is one persistent socket, not many HTTP calls. Deep dive: Playwright vs Selenium (2026 comparison) and the pillar comparison blog.

Tips to remember
  • Structure the answer as a small table in your head: dimension, option A, option B — and close with "I'd pick X when Y".
  • Be ready to whiteboard the WebSocket vs JSON Wire Protocol — why does one connection beat many 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 minQ9 / 27

Q9.Installation — which is faster?

Asked byAccentureInfosysCognizantWipro
Why interviewers ask this

This Playwright vs Selenium question checks whether you can go beyond textbook knowledge on Installation — which is faster 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: npm i -D @playwright/test && npx playwright install — one command, bundles browsers. Selenium: add dependencies, drivers auto-download via Selenium Manager (4.6+), then wire in TestNG/JUnit.

Tips to remember
  • Anchor the answer in a real Playwright vs Selenium project — panels reward specificity on Installation — which is faster over textbook wording.
  • Be ready to whiteboard the Installation — which is faster snippet live — panels often ask you to type it, not describe it.
Medium Very Common 1 minQ10 / 27

Q10.Does Playwright need a Selenium-style Grid?

Asked byMicrosoftAccentureInfosysCognizant
Why interviewers ask this

This Playwright vs Selenium question checks whether you can go beyond textbook knowledge on Does Playwright need a Selenium-style Grid 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 is parallel-by-default via workers on a single machine. For horizontal scaling: shard with --shard=N/M across CI runners. Selenium needs Grid (or a cloud like BrowserStack) to fan out.

Tips to remember
  • Anchor the answer in a real Playwright vs Selenium project — panels reward specificity on Does Playwright need a Selenium-style Grid over textbook wording.
  • Be ready to whiteboard the Does Playwright need a Selenium-style Grid 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 Common 1 minQ11 / 27

Q11.How do you write a login test in each?

Asked byCognizantWiproAmazonCapgemini
Why interviewers ask this

Hands-on "how would you write a login test in each" questions reveal whether you've actually shipped Playwright vs Selenium 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
await page.goto('/login');
await page.getByLabel('Email').fill('qa@x.com');
await page.getByLabel('Password').fill('secret');
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page).toHaveURL('/dashboard');
// Selenium (Java + JUnit)
driver.get("/login");
driver.findElement(By.id("email")).sendKeys("qa@x.com");
driver.findElement(By.id("password")).sendKeys("secret");
driver.findElement(By.id("submit")).click();
new WebDriverWait(driver, Duration.ofSeconds(10))
    .until(ExpectedConditions.urlContains("/dashboard"));
Tips to remember
  • Walk through write a login test in each as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the write a login test in each snippet live — panels often ask you to type it, not describe it.
Medium Common 1 minQ12 / 27

Q12.How do you handle SPA loading?

Asked byInfosysCognizantWiproAmazon
Why interviewers ask this

Hands-on "how would you handle SPA loading" questions reveal whether you've actually shipped Playwright vs Selenium 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: auto-waits for domcontentloaded/networkidle. Selenium: explicit wait on a stable element or URL change. Never rely on pageLoadTimeout alone for SPAs.

Tips to remember
  • Walk through handle SPA loading as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the handle SPA loading 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.
Confidence check

If you can confidently answer the Architecture & Setup (Pillar) 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. Waits, Locators & Assertions

Medium Common 1 minQ13 / 27

Q13.Compare the locator APIs.

Asked byAmazonCapgeminiTCSMicrosoft
Why interviewers ask this

Comparison questions like this test whether you understand Compare the locator APIs at a design level — not just that both exist, but when to pick one over the other. Panels use it to see if you can defend a trade-off with a real project example.

Detailed explanation

Playwright's getByRole, getByLabel, getByTestId are accessibility-first and self-healing. Selenium's By.* is lower-level: id, css, xpath, plus Selenium 4 relative locators. Playwright's locators are lazy and re-evaluate; Selenium's WebElement can go stale.

Tips to remember
  • Structure the answer as a small table in your head: dimension, option A, option B — and close with "I'd pick X when Y".
  • Be ready to whiteboard the Compare the locator APIs 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 Common 1 minQ14 / 27

Q14.What is Playwright's expect() vs Selenium assertions?

Asked byWiproAmazonCapgeminiTCS
Why interviewers ask this

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

Detailed explanation

Playwright's expect(locator).toHaveText(...) auto-retries until the condition passes or times out. Selenium requires you to combine WebDriverWait + JUnit/TestNG assertion. Auto-retrying assertions are Playwright's single biggest flake-killer.

Tips to remember
  • Open with a one-sentence definition of Playwright's expect() vs Selenium assertions, then a concrete Playwright vs Selenium example — never start with history or theory.
  • Be ready to whiteboard the Playwright's expect() vs Selenium assertions snippet live — panels often ask you to type it, not describe it.
Medium Common 1 minQ15 / 27

Q15.How do you handle iframes in each?

Asked byTCSMicrosoftAccentureInfosys
Why interviewers ask this

Hands-on "how would you handle iframes in each" questions reveal whether you've actually shipped Playwright vs Selenium 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
const frame = page.frameLocator('#pay');
await frame.getByRole('button', { name: 'Pay' }).click();
// Selenium
driver.switchTo().frame("pay");
driver.findElement(By.id("pay-btn")).click();
driver.switchTo().defaultContent();
Tips to remember
  • Walk through handle iframes in each as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the handle iframes in each 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 Common 1 minQ16 / 27

Q16.How do you assert an element is hidden?

Asked byCapgeminiTCSMicrosoftAccenture
Why interviewers ask this

Hands-on "how would you assert an element is hidden" questions reveal whether you've actually shipped Playwright vs Selenium 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 — auto-retrying
await expect(page.getByTestId('spinner')).toBeHidden();
// Selenium
new WebDriverWait(driver, Duration.ofSeconds(10))
  .until(ExpectedConditions.invisibilityOfElementLocated(By.id("spinner")));
Tips to remember
  • Walk through assert an element is hidden as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the assert an element is hidden snippet live — panels often ask you to type it, not describe it.
Medium Common 1 minQ17 / 27

Q17.Which is more resilient to flaky tests?

Asked byAccentureInfosysCognizantWipro
Why interviewers ask this

Listing questions on Which is more resilient to flaky tests 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, materially — auto-wait, auto-retry assertions, isolated BrowserContext per test, and the Trace Viewer for post-mortem. Selenium flakes are usually solvable with disciplined explicit waits and POM, but the ceiling is lower.

Tips to remember
  • Group the items into 2–3 categories before listing — panels remember structure, not raw counts.
  • Be ready to whiteboard the Which is more resilient to flaky 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 Common 1 minQ18 / 27

Q18.How do you run tests in parallel in each?

Asked byMicrosoftAccentureInfosysCognizant
Why interviewers ask this

Hands-on "how would you run tests in parallel in each" questions reveal whether you've actually shipped Playwright vs Selenium 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 — parallel by default; tune workers
// playwright.config.ts
export default { workers: 4 };
<!-- TestNG suite -->
<suite name="R" parallel="methods" thread-count="8">

Selenium also needs a ThreadLocal<WebDriver> to keep sessions isolated.

Tips to remember
  • Walk through run tests in parallel in each as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the run tests in parallel in each 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.
Confidence check

If you can confidently answer the Waits, Locators & Assertions 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. Parallelism, Network & Tracing

Medium Common 1 minQ19 / 27

Q19.How do you intercept / mock network calls?

Asked byCognizantWiproAmazonCapgemini
Why interviewers ask this

Hands-on "how would you intercept / mock network calls" questions reveal whether you've actually shipped Playwright vs Selenium 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 — first-class
await page.route('**/api/users', r => r.fulfill({ json: [{ id: 1 }] }));

Selenium has to use Selenium 4 CDP (DevTools) or a proxy like BrowserMob — clunkier and Chromium-only.

Tips to remember
  • Walk through intercept / mock network calls as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the intercept / mock 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.
Medium Common 1 minQ20 / 27

Q20.How do you debug a failed test?

Asked byInfosysCognizantWiproAmazon
Why interviewers ask this

Hands-on "how would you debug a failed test" questions reveal whether you've actually shipped Playwright vs Selenium 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: trace: 'on-first-retry' + open the Trace Viewer (DOM snapshots, network, console, actions timeline). Selenium: screenshots on failure via TestNG listener + Extent/Allure reports. Playwright's DX is meaningfully better here.

Tips to remember
  • Walk through debug a failed test as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the debug a failed test 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 Occasional 1 minQ21 / 27

Q21.Which produces better reports?

Asked byAmazonCapgeminiTCSMicrosoft
Why interviewers ask this

Listing questions on Which produces better reports 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

Both need add-ons. Playwright: built-in HTML reporter + Trace Viewer. Selenium: Extent Reports, Allure, or ReportPortal via TestNG listener. Trace Viewer wins for step-by-step debugging.

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 produces better reports cleanly.
  • Say who reads the report and what decision it drives — evidence-for-humans framing beats a tool name list.
Easy Occasional 1 minQ22 / 27

Q22.Which one supports mobile app automation?

Asked byWiproAmazonCapgeminiTCS
Why interviewers ask this

Listing questions on Which one supports mobile app automation 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

Neither — both are for web browsers. For native mobile you still need Appium (WebDriver-based). Playwright supports mobile emulation in Chromium/WebKit, but that's not real device testing.

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 one supports mobile app automation cleanly.
  • Split the answer into emulator (fast feedback) vs real device (final gate) and say where each runs in your pipeline.
Easy Occasional 1 minQ23 / 27

Q23.How do you handle CAPTCHA / OAuth pop-ups?

Asked byTCSMicrosoftAccentureInfosys
Why interviewers ask this

Hands-on "how would you handle CAPTCHA / OAuth pop-ups" questions reveal whether you've actually shipped Playwright vs Selenium 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

Same strategy in both: bypass in test environments (test-mode CAPTCHA keys, direct-grant OAuth flows, seeded sessions). Neither tool magically solves CAPTCHAs.

Tips to remember
  • Walk through handle CAPTCHA / OAuth pop-ups 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 / OAuth pop-ups cleanly.
  • Cover token expiry and refresh in your answer; most candidates only describe the happy-path login.
Confidence check

If you can confidently answer the Parallelism, Network & Tracing 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. Choosing, Migrating & Career

Easy Occasional 1 minQ24 / 27

Q24.When should I still choose Selenium in 2026?

Asked byCapgeminiTCSMicrosoftAccenture
Why interviewers ask this

Timing questions like this check whether you understand the trade-offs of should I still choose Selenium in 2026. 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
  • Existing Java/TestNG + Grid suite with hundreds of tests
  • Need Ruby / C# / Kotlin support
  • Enterprise / BFSI / gov shops with WebDriver-based tooling
  • Real Safari on macOS via SafariDriver
Tips to remember
  • Answer in the form "Use should I still choose Selenium in 2026 when …, avoid it when …" so the interviewer hears both sides in one breath.
  • Group the should I still choose Selenium in 2026 points into 2–3 buckets so you can recall them under pressure without missing one.
  • Mention capability matrix and cost/queue trade-offs — that's the operational angle panels probe next.
Easy Occasional 1 minQ25 / 27

Q25.When should I pick Playwright?

Asked byAccentureInfosysCognizantWipro
Why interviewers ask this

Timing questions like this check whether you understand the trade-offs of should I pick Playwright. 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
  • Greenfield project with TypeScript/JavaScript/Python
  • Modern SPA (React/Vue/Angular) with heavy async
  • Team wants fast feedback loops and low flakiness
  • Cross-browser (Chromium + Firefox + WebKit) without infra

Deep dive: Playwright vs Selenium (2026 comparison).

Tips to remember
  • Answer in the form "Use should I pick Playwright when …, avoid it when …" so the interviewer hears both sides in one breath.
  • Group the should I pick Playwright points into 2–3 buckets so you can recall them under pressure without missing one.
  • Quote a real flake-rate number before and after your fix; measured outcomes score far higher than "we added retries".
Medium Occasional 1 minQ26 / 27

Q26.How would you migrate a Selenium suite to Playwright?

Asked byMicrosoftAccentureInfosysCognizant
Why interviewers ask this

Hands-on "how would you migrate a Selenium suite to Playwright" questions reveal whether you've actually shipped Playwright vs Selenium 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
  1. Freeze new Selenium test additions
  2. Port page objects one-by-one, keeping data models
  3. Replace explicit waits with Playwright's auto-wait + expect
  4. Add trace: 'on-first-retry' from day one
  5. Run both suites in CI until parity, then delete Selenium
Tips to remember
  • Walk through migrate a Selenium suite to Playwright as numbered steps and call out the tool, command, or API used at each step.
  • Be ready to whiteboard the migrate a Selenium suite to Playwright 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.
Easy Occasional 1 minQ27 / 27

Q27.Which one gets you hired faster in 2026?

Asked byCognizantWiproAmazonCapgemini
Why interviewers ask this

Listing questions on Which one gets you hired faster in 2026 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

Depends on the market. India / US enterprise: Selenium still edges by JD count. US startups / EU product companies: Playwright is climbing fast and pays a premium. Ideal candidate knows both — see our Selenium 300 Q&A and Playwright Q&A.

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 one gets you hired faster in 2026 cleanly.
RelatedQ25
Confidence check

If you can confidently answer the Choosing, Migrating & Career 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: Playwright vs Selenium — what's the 30-second answer — Playwright is the modern, faster, TypeScript-first framework with native auto-wait, parallel-by-default execution, and trace viewer.
  2. Q2: Which is faster — Playwright — often 2–5x on the same suite.
  3. Q3: Which supports more languages — Selenium : Java, Python, C#, Ruby, JavaScript, Kotlin.
  4. Q4: Which supports more browsers — Browser Selenium Playwright Chrome / Edge Yes Yes (bundled Chromium) Firefox Yes Yes (bundled) Safari Yes (SafariDriver) WebKit engine (not Safari itself) IE 11 Yes (legacy) No Mob
  5. Q5: Which one auto-waits — Playwright — every action waits for visible + stable + enabled + receiving-events before firing.

Frequently asked questions

1.Is Playwright replacing Selenium?
Not yet. Playwright is the fastest-growing framework, but Selenium's install base and language breadth keep it dominant in enterprise. Expect coexistence through the late 2020s.
2.Can Playwright and Selenium share the same test infrastructure?
Somewhat. Both can post JUnit-XML to Jenkins/CircleCI, both work with cloud grids (BrowserStack, Sauce Labs), but the runners and locator APIs are incompatible — you can't literally reuse test code.
3.Which is easier for a fresher to learn?
Playwright — auto-wait removes the most confusing part of Selenium (waits), and the trace viewer makes debugging feel like a superpower.
4.Do FAANG companies ask Playwright vs Selenium questions?
Yes — SDET loops routinely ask you to justify a framework choice for a given system. Prep both sides.

Playwright vs Selenium jobs hiring now

Live, indexable Playwright vs Selenium openings — updated daily in Jobs Radar.

Browse all QA jobs on Jobs Radar

Loading current openings…

Home