Sparround

Technical rapid-fire questions

Many interviews open with a rapid-fire round: 10-15 short questions in quick succession, 20-40 seconds each. The goal isn't to probe depth — it's to see whether the fundamentals are settled and whether you're comfortable.

How to answer:

  • Short and direct — 2-3 sentences. A long answer is a negative signal here: it shows you didn't notice the question was simple
  • Then offer depth: "...I can go into detail if useful" — if the interviewer cares, they'll ask
  • Add an example (one sentence) — a concrete example is what separates understanding from recitation
  • If you don't know — "I don't know that precisely, but I'd guess..." or simply "I don't know, I'd look it up." Making something up is the worst option: interviewers almost always sense it, and afterwards they doubt every other answer

On rhythm: saying "I don't know" to 2-3 out of 15 is completely normal. Answering all 15 isn't expected; staying composed and honest is.

QuestionModel answer (20-30 seconds)
What is auto-waiting in Playwright?Before every action Playwright waits for the element to be actionable: visible, enabled, stable, receiving events. That's why you never need `sleep`.
Difference between a `locator` and an `ElementHandle`?A locator is lazy — it re-resolves the element on each use, so it survives DOM updates. An ElementHandle binds to a specific DOM node and goes stale; it isn't used in modern code.
Difference between `toBeVisible()` and `isVisible()`?`expect(...).toBeVisible()` is a web-first assertion — it waits until the condition holds. `isVisible()` returns a boolean for that instant without waiting — using it as a condition in a test is a flakiness source.
What is strict mode?When a locator matches more than one element Playwright throws — preventing a silently wrong pick. Fix: refine the locator, use `filter()`, or `first()`/`nth()` when it's intentional.
Difference between `page` and `context`?A `context` is an isolated browser profile with its own cookies and storage; a `page` is one tab inside it. Two different users need two contexts, not two tabs.
What is storageState for?It logs in once in setup and writes cookies/localStorage to a file; all tests start from that state. Saves 5-10 seconds per test.
Where does fixture teardown go?In the code after the `await use(...)` line. It runs even when the test fails — which makes it the most reliable place for cleanup.
What is sharding?Splitting the suite across machines: `--shard=1/4`. Four machines cut total time roughly fourfold. Requirement: fully independent tests.
How do you reach an element inside an iframe?I switch into the frame with `page.frameLocator('iframe[title="..."]')`; ordinary locators work inside. A plain locator doesn't cross the frame boundary.
What do you do when a new tab opens?I arm `context.waitForEvent('page')` BEFORE the click, then click and `await` the new `page` object.
How do you test file upload?`setInputFiles('path/to/file')` — no OS dialog involved. For a custom button hiding the input, I intercept `page.waitForEvent('filechooser')`.
How do you call an API in Playwright?With the `request` fixture: `await request.post('/api/orders', { data })`. I use it instead of the UI for test-data setup — faster and more stable.
QuestionModel answer
Difference between `==` and `===`?`===` performs no type coercion; `==` does (`'1' == 1` → true). Always `===` in tests.
What is a Promise, what does `async/await` do?A Promise is the eventual result of an operation. `await` waits for it to settle and keeps the code readable as a sequence. The Playwright API is fully async — a forgotten `await` silently makes the test falsely green.
Difference between `let`, `const`, `var`?`const` and `let` are block-scoped; `var` is function-scoped and hoisted — I don't use it. Default to `const`, use `let` when the value changes.
What does TypeScript give you in test code?Errors caught before running, IDE autocomplete (a big difference for the Playwright API), types for fixtures and test data. It also enables typed lint rules like `no-floating-promises`.
What is a flaky test?A test that passes and fails without code changes. Typical causes: race conditions, fixed sleeps, shared data. Its worst damage is killing trust in the suite.
Difference between smoke and regression?Smoke — a fast check of the most critical flows (is the build usable at all?), on every PR. Regression — broad coverage confirming existing functionality still works, usually nightly.
What is the test pyramid?Many fast unit tests, a moderate number of integration/API, few E2E UI. The principle: verify at the lowest possible level.
Difference between `merge` and `rebase` in Git?`merge` preserves history and creates a merge commit; `rebase` rewrites commits for a linear history. Rebasing a shared branch is dangerous.

The most important advice: don't invent. "I don't know" costs you one question; an invented answer casts doubt over the whole interview, because the interviewer starts fact-checking everything else. The strongest variant: "I haven't used that, but here's how I imagine it works... — is that right?" It shows honesty, reasoning ability and openness to learning at once.