QA Interview
Junior SDET Playwright Trace Debugging Interview Questions (2026)
Practice junior SDET Playwright trace debugging interview questions with answers on Trace Viewer, locators, timeouts, retries, network, and CI failures.
22 min read | 3,852 words
TL;DR
A strong junior answer connects the symptom to a specific Playwright artifact, explains what that evidence can prove, and names the next safe experiment. Know Trace Viewer, semantic locators, actionability, timeout scopes, network events, retries, Inspector, UI Mode, and CI artifact handling.
Key Takeaways
- Start with the failed action and work backward to the earliest incorrect state.
- Use Trace Viewer for retained CI evidence and Inspector or UI Mode for live local debugging.
- Read actionability logs before changing locators, timeouts, or click options.
- Register response waits before the action that triggers the request.
- Treat a passed retry as a flaky result that still needs investigation.
- Explain every fix with the evidence that supports it and a prevention step.
Junior SDET Playwright trace debugging interview questions test whether you can turn a failed test into a small, evidence-based investigation. The strongest answer names what you would inspect, what signal you expect to find, and what you would change only after confirming the cause.
This guide gives you 45 practical questions with model answers, runnable TypeScript examples, and a clear grading rubric. Use the Playwright trace on retry guide for a deeper setup walkthrough, then rehearse these answers in the /practice interview workspace.
TL;DR
| Topic | Evidence or tool | What a good junior answer proves |
|---|---|---|
| Trace investigation | Timeline, actions, DOM snapshots, network, console | You can locate the first meaningful divergence |
| Locator failure | Strictness error and actionability log | You understand identity, visibility, stability, and event reception |
| Timeout | Error type, call log, test step | You know which clock expired before raising a limit |
| Network problem | Request, response, status, payload, UI state | You separate transport success from rendered behavior |
| CI flakiness | First-failure artifact, retry result, project metadata | You compare environments and shared state systematically |
| Live debugging | UI Mode, Inspector, page.pause(), DEBUG=pw:api |
You select a tool that matches the investigation |
The answer pattern is simple: state the symptom, inspect one relevant artifact, form a falsifiable hypothesis, run one focused check, and repair the root cause. Avoid opening with "I would increase the timeout." A timeout increase is justified only when the requirement genuinely permits a longer operation and the trace shows correct progress.
1. Junior SDET Playwright Trace Debugging Interview Questions: Core Concepts
Q: What is a Playwright trace?
A Playwright trace is a recorded test artifact that connects actions and assertions with timing, DOM snapshots, screenshots, source locations, network activity, and browser logs. It lets you inspect the page around each step instead of guessing from the final error. In an interview, describe it as evidence for reconstructing execution, not merely a video of the run.
Q: Why is a trace more useful than a failure screenshot?
A screenshot freezes one visual moment, while a trace preserves the sequence that produced it. You can examine the locator call log, inspect the DOM before and after an action, and correlate a missing UI state with a request or console error. A screenshot may look normal even when an invisible overlay intercepted the click or the target was repeatedly replaced.
Q: How does Trace Viewer differ from Playwright Inspector?
Trace Viewer analyzes a previously recorded run, which makes it ideal for CI failures and artifacts shared by teammates. Inspector controls a live execution, lets you step over Playwright calls, pick locators, and read actionability logs while the browser is open. Choose the trace when the failure already happened elsewhere; choose Inspector when you can reproduce and explore locally.
Q: What should a junior SDET do first after seeing a failed test?
Read the exact error and identify the failed action, assertion, fixture, or hook before editing code. Open the report or trace and find the last successful step, then classify the likely layer as test, product, data, environment, or tooling. That classification creates a useful next check, such as inspecting locator matches for a strictness error or the response status for a missing result.
Q: What makes a debugging hypothesis useful?
A useful hypothesis predicts observable evidence and can be disproved. For example, "The Save click waits because a loading overlay still receives pointer events" predicts an actionability message and an overlay in the DOM snapshot. The phrase "It is probably timing" does not name an event, a component, or a check, so it cannot guide an efficient experiment.
For broader preparation after mastering these foundations, compare the depth expected in senior Playwright debugging interview questions.
2. Recording and Retrieving Traces
Q: How would you configure useful Playwright artifacts in CI?
Enable a retry and record the first retry trace, while retaining screenshots and video only when they add value. This keeps normal passing runs lighter and gives a failed test another instrumented attempt. The following config uses documented Playwright Test options and can run with any specs under tests/.
// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests',
retries: process.env.CI ? 1 : 0,
reporter: [['html', { open: 'never' }]],
use: {
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
],
});
Q: Which trace mode would you choose for different situations?
Use on-first-retry as a cost-aware CI default when retry evidence is sufficient. Choose retain-on-failure when the original failed attempt matters, because each run is recorded and only failed runs are kept. Use on for a small, focused diagnostic run, not an entire routine suite, since it records every attempt.
| Trace mode | Recorded attempts | Practical use |
|---|---|---|
off |
None | Runs where traces are intentionally disabled |
on |
Every attempt | Short local investigation |
on-first-retry |
First retry | Lean CI diagnostics |
on-all-retries |
Every retry | Comparing multiple retry attempts |
retain-on-failure |
Every attempt, keeps failures | Preserving the actual failed run |
retain-on-first-failure |
Initial run, kept if it fails | Protecting first-attempt evidence |
retain-on-failure-and-retries |
Every attempt, keeps failures and retries | Full retry-chain comparison |
Q: Why might trace: 'on-first-retry' produce no trace?
The test may have passed on its initial run, or retries may be zero, so no first retry occurred. The trace might also exist in test-results but be absent from CI because that directory or the HTML report was not uploaded after failure. Verify the result classification, retry count, output path, and artifact upload condition before changing trace settings.
Q: How do you open a downloaded trace.zip?
Run npx playwright show-trace path/to/trace.zip from a project with Playwright installed. Confirm that the archive belongs to the failed browser project, shard, commit, and retry, because similar names can mislead an investigation. You can also open the HTML report with npx playwright show-report and select the trace attachment from the test details.
Q: Should you manually call context.tracing.start() inside Playwright Test?
Usually no, because the runner's use.trace setting includes Playwright Test assertions and manages lifecycle, retries, paths, and report attachments. Manual context tracing is appropriate for Playwright Library scripts or a browser context outside runner ownership. Mixing both mechanisms in a normal test can create incomplete or confusing archives and extra cleanup work.
The trace on retry examples show additional configuration patterns for CI and local diagnosis.
3. Reading Trace Viewer Systematically
Q: Where do you start when opening a failed trace?
Select the failed action or assertion, read its error and call log, and then move backward to the last correct state. Look for the earliest point where actual behavior diverged from the expected journey. Starting at the first divergence avoids blaming the final assertion for a failure caused several requests or clicks earlier.
Q: What does the action timeline tell you?
The timeline shows the order and duration of Playwright calls, assertions, hooks, and custom test steps. A long click can reveal waiting for actionability, while a fast click followed by a long assertion points toward application state or an incorrect expectation. Compare neighboring steps so you know whether the delay began before, during, or after the user action.
Q: How do DOM snapshots help with a locator failure?
A snapshot lets you inspect the recorded HTML and accessible structure at a specific action. Check how many elements matched, whether the intended element existed, and whether an overlay, duplicate control, or responsive variant was present. Because the snapshot belongs to that moment, it is stronger evidence than inspecting the application's current DOM after the run.
Q: What should you inspect in the network panel?
Find requests related to the failed state transition and compare URL, method, status, timing, and response content. A missing confirmation could follow a 401, a 500, a blocked request, or a 200 response with an application-level error body. Connect the network event to the visible UI before deciding whether the defect belongs to the frontend, backend, test data, or assertion.
Q: How would you compare a passing trace with a failing trace?
Align both runs at the same last known-good action and identify the first differing event. Compare locator resolution, request order and response, console output, data identity, and rendered state rather than comparing total duration alone. Change one environmental factor at a time after that comparison, because multiple simultaneous changes make the evidence inconclusive.
4. Locator and Actionability Debugging
Q: What does a strict mode violation mean?
An operation that requires one target resolved to multiple elements. Read the matched-element list, then scope the locator using a meaningful container, role, accessible name, label, or stable test id. Do not use .first() simply to silence the error unless the first item is explicitly part of the requirement.
Q: A button is visible, but click() times out. What do you inspect?
Visibility is only one click requirement. Playwright also checks that the target is stable, receives events, is enabled, and resolves to exactly one element. Read the actionability log for an overlay, animation, disabled state, or repeated detachment, then fix the product readiness signal or locator rather than forcing the click.
Q: Why can an element become detached during an action?
A framework re-render may replace the node between discovery and interaction, especially after validation, loading, or list refresh. Locators normally resolve the current element for each action, so keep a locator rather than an old element-like handle and wait for a user-visible stable state. The trace can show repeated node replacement or changing markup around the attempted action.
Q: How do you replace a brittle nth() locator?
Select the record by a domain identity, then find its action inside that scoped row or card. This survives sorting and inserted items because the test names the entity it intends to use. The example below is a complete runnable test that also generates a useful trace when invoked with --trace=on.
// tests/trace-debugging.spec.ts
import { test, expect } from '@playwright/test';
test('ships the intended order', async ({ page }) => {
await page.setContent(`
<table>
<tr><th>Order</th><th>Status</th><th>Action</th></tr>
<tr><td>ORD-1041</td><td>Pending</td><td><button>Ship</button></td></tr>
<tr><td>ORD-1042</td><td>Ready</td><td><button>Ship</button></td></tr>
</table>
<p role="status">No order shipped</p>
<script>
document.querySelectorAll('button').forEach(button => {
button.addEventListener('click', event => {
const row = event.target.closest('tr');
document.querySelector('[role=status]').textContent =
'Shipped ' + row.cells[0].textContent;
});
});
</script>
`);
const order = page.getByRole('row').filter({ hasText: 'ORD-1042' });
await expect(order).toContainText('Ready');
await order.getByRole('button', { name: 'Ship' }).click();
await expect(page.getByRole('status')).toHaveText('Shipped ORD-1042');
});
Verify it with npx playwright test tests/trace-debugging.spec.ts --project=chromium --trace=on, then open the result with npx playwright show-report.
Q: When is force: true acceptable?
Use it only when bypassing a nonessential actionability check is the behavior under test, such as exercising an intentionally covered control through a lower-level interaction. It is not a general repair for intercepted clicks because a real user may also be blocked. If forcing changes the result, treat that as diagnostic evidence and investigate the overlay, hit target, or application state.
For more locator exercises, use the Playwright coding interview questions after you can explain each failure without guessing.
5. Waiting and Timeout Diagnosis
Q: Why is page.waitForTimeout() usually a poor fix?
A fixed delay waits longer than necessary on fast runs and can still be too short on slow runs. It also hides the state the test actually needs, such as an enabled button, completed response, changed URL, or visible status. Use a web-first assertion or a targeted event wait that expresses the requirement.
Q: What timeout scopes should a junior SDET know?
The test timeout bounds the test body, fixture setup, and beforeEach, while auto-retrying assertions use a separate expect timeout. Action and navigation timeouts can be configured independently, and the full run can have a global timeout. Read the error and call log to identify the expired clock, because increasing the test timeout cannot make an ambiguous locator become unique.
Q: Why can a response finish before the UI is ready?
The frontend may still parse data, update state, render components, or complete another dependent request after transport finishes. Await the triggering action and assert the final user-visible state instead of treating one response as proof of rendering. Inspect console and response content when a successful status does not produce the expected screen.
Q: Why is networkidle often a weak readiness signal?
Polling, analytics, background refresh, and WebSockets can prevent the network from becoming idle. The page can also become briefly quiet before required UI work completes. Prefer a specific heading, record, enabled control, URL, or response tied directly to the business outcome.
Q: How do you debug a test that reaches the overall timeout with no clear failed line?
Find the last started step in the report or trace, then inspect hooks, fixtures, event waits, and promises around it. A missed event, unresolved promise, missing await, or hanging cleanup can consume the remaining test budget. Run the single test with one worker and DEBUG=pw:api, then reduce the scenario until the unfinished operation is obvious.
Use the Playwright timeout diagnosis guide to practice distinguishing assertion, action, navigation, fixture, and test limits.
6. Network, Console, and Browser Evidence
Q: A request returns 200, but the test still fails. What could be wrong?
HTTP success does not guarantee a valid business payload or correct rendering. Inspect the body for an error object, empty result, stale data, or schema mismatch, then check the console and final DOM. State your conclusion only after connecting the response to what the user should see.
Q: How should you wait for a response triggered by a click?
Create the response promise before clicking so the test cannot miss a fast event. Filter by a meaningful URL and method, await the action, then await the response and verify both transport and UI outcome. This runnable example controls the endpoint, so it has no external service dependency.
// tests/network-evidence.spec.ts
import { test, expect } from '@playwright/test';
test('connects an order response to the rendered status', async ({ page }) => {
await page.route('https://example.test/api/orders', async route => {
await route.fulfill({
status: 201,
contentType: 'application/json',
headers: { 'access-control-allow-origin': '*' },
body: JSON.stringify({ id: 'ORD-1042', status: 'Created' }),
});
});
await page.setContent(`
<button>Create order</button>
<p role="status">Not created</p>
<script>
document.querySelector('button').addEventListener('click', async () => {
const response = await fetch('https://example.test/api/orders', { method: 'POST' });
const order = await response.json();
document.querySelector('[role=status]').textContent = order.status;
});
</script>
`);
const responsePromise = page.waitForResponse(response =>
response.url() === 'https://example.test/api/orders' &&
response.request().method() === 'POST'
);
await page.getByRole('button', { name: 'Create order' }).click();
const response = await responsePromise;
expect(response.status()).toBe(201);
await expect(page.getByRole('status')).toHaveText('Created');
});
Verify it with npx playwright test tests/network-evidence.spec.ts --project=chromium --trace=on. A passing report should show the POST response and the final toHaveText assertion.
Q: How do console messages help a trace investigation?
Console warnings can expose failed hydration, deprecations, blocked resources, or application diagnostics near the first bad state. Match the message timestamp to the action rather than assuming every warning caused the failure. A precise answer quotes the relevant error category and explains which follow-up check would confirm its impact.
Q: What is the difference between console and pageerror events?
The console event represents messages written through browser console APIs. The pageerror event reports an uncaught exception from the page, which may stop application logic before the expected UI appears. Listen to both when reproducing a failure because a silent test assertion may be downstream of a JavaScript crash.
Q: Can network mocking hide a real defect?
Yes, a broad route can bypass authentication, caching, headers, latency, redirects, or a changed backend contract. Use mocks to isolate a layer, but keep contract or integration coverage for the real boundary. When a mocked test passes and the integrated test fails, compare the actual request and response instead of declaring the UI fixed.
7. Retries, Flakiness, and CI Failures
Q: What does it mean when a test fails and then passes on retry?
Playwright classifies that result as flaky, not as a clean pass. The changed outcome proves that timing, data, environment, product behavior, or shared state differed between attempts. Preserve both attempts when possible and identify the earliest difference before deciding on a repair.
Q: Does a Playwright retry use the same worker process?
After a failure, Playwright discards the worker and starts a new one for subsequent execution. Worker-scoped fixtures and relevant hooks run again, but external database, account, queue, or service state is not automatically rolled back. A retry may therefore pass because the first attempt completed part of the workflow or fail differently because it left partial data.
Q: How do you investigate a failure that happens only in CI?
Compare browser project, headless mode, viewport, locale, time zone, environment variables, CPU pressure, workers, test data, and deployment revision. Download the CI trace and reproduce the same test with the same project and worker count before changing assertions. Avoid calling it a CI problem until the artifact identifies an environmental difference or infrastructure event.
Q: Why might a test fail only when run in parallel?
Workers may share an account, record, filename, port, rate limit, or cleanup routine. Run the test alone and then with the original concurrency, giving each worker unique data through fixtures or testInfo.workerIndex. If isolation removes the failure, the trace and backend evidence should still show which shared resource collided.
Q: How should trace artifacts be secured?
Treat traces like potentially sensitive test reports because they can contain DOM text, URLs, network details, source, console messages, and attachments. Use synthetic accounts, avoid secrets in test data, restrict artifact access, and set a retention period that matches policy. Before sharing a trace outside the team, inspect what the application recorded rather than assuming the zip is harmless.
The flaky test debugging interview questions cover cross-framework causes that also apply to Playwright suites.
8. Inspector, UI Mode, and Local Debug Commands
Q: What does npx playwright test --debug do?
It opens Playwright Inspector and runs headed with debugging-friendly settings, including no default timeout for the debug session. You can step through API calls, use the locator picker, and inspect actionability logs. Narrow the command to a file, line, or project so an interview demonstration stays focused.
npx playwright test tests/trace-debugging.spec.ts:4 --project=chromium --debug
Q: When would you use UI Mode?
Run npx playwright test --ui for an interactive local workbench with watch behavior, step details, DOM snapshots, errors, and locator exploration. It is useful while developing or repeatedly reproducing a scenario. For a completed remote CI run, use its retained trace because UI Mode cannot recreate the exact past environment by itself.
Q: What does await page.pause() provide?
It pauses execution and opens Inspector when the test runs in an appropriate headed debug environment. Place it immediately before the suspicious interaction to inspect current locators and state. Remove it before committing, because an unattended CI run cannot continue past an intentional interactive pause.
Q: What does DEBUG=pw:api show?
It prints verbose Playwright API logs, including operations and waiting behavior, to the terminal. This is helpful when the GUI artifact is unavailable or a hook, fixture, or call appears stuck. Restrict the run to one failing test so the log remains readable and does not bury the relevant sequence.
DEBUG=pw:api npx playwright test tests/trace-debugging.spec.ts --project=chromium --workers=1
Q: Is headed mode alone enough for debugging?
Headed mode lets you watch the browser, but visual observation does not expose every DOM replacement, request, actionability retry, or console exception. Combine it with Inspector, UI Mode, verbose logs, or a trace according to the failure. slowMo can make a sequence easier to see in a library script, but slowing execution may also hide the original race.
The focused guide to debugging a Playwright failure in VS Code adds breakpoint and extension workflows.
9. Junior SDET Playwright Trace Debugging Interview Questions: Applied Scenarios
Q: A spinner never disappears. How would you debug it?
Inspect the trace from the action that started loading, then correlate the spinner snapshot with its related requests and page errors. Determine whether the backend never responded, the response was invalid, or frontend state failed to clear after completion. Replace any sleep with await expect(spinner).toBeHidden() only after the product has a reliable completion path.
Q: The screenshot shows the correct button, but the click says another element intercepts events. What is your answer?
The screenshot proves appearance, not the pointer hit target. I would read the call log and inspect the snapshot for a transparent overlay, sticky header, animation, or dialog backdrop at the click coordinates. I would wait for the overlay's observable closed state or report the product defect, rather than using force: true to conceal it.
Q: A trace contains no expected API request. What do you check next?
Move backward to verify that the triggering action happened on the intended control and that earlier JavaScript did not crash. Check form validation, disabled state, console errors, route interception, service worker behavior, and whether the URL filter is wrong. If the UI never emitted the request, debugging response timing would address the wrong layer.
Q: Authentication passes locally but fails with 401 in CI. How do you investigate?
Verify how storageState was created, which project loads it, whether it expired, and whether the CI base URL matches the cookie domain and security rules. Inspect the first unauthorized request and confirm that expected cookies or headers were present without exposing their values. Regenerate state in a controlled setup when authentication freshness is required, and keep test accounts isolated across workers.
Q: What should you say when you do not know the root cause yet?
Separate facts from hypotheses and propose the next smallest evidence-producing check. A credible answer might be, "The trace proves the click completed, but it does not yet explain why rendering stopped; I would inspect the response body and page error at that timestamp." Interviewers value disciplined uncertainty more than a confident guess that leads to an unrelated timeout change.
How Interviewers Grade Your Answers
Interviewers usually score the reasoning chain, not the number of tool names you recite. A strong junior answer is ordered, scoped, and tied to visible evidence.
| Signal | Weak answer | Strong answer |
|---|---|---|
| Observation | "The test is flaky" | Names the failed step, error, attempt, and environment |
| Tool choice | Opens every artifact | Selects the trace, Inspector, log, or network event for a stated reason |
| Hypothesis | "There is a timing issue" | Predicts a specific overlay, response, duplicate locator, or state race |
| Fix | Adds sleep, retry, or force | Changes the readiness signal, locator identity, isolation, or product behavior |
| Verification | Runs the whole suite once | Repeats the smallest reproduction, then runs relevant regression coverage |
| Communication | States a guess as fact | Separates confirmed evidence, inference, risk, and next step |
Use a compact response structure during the interview: "I see X. I would inspect Y because it can confirm Z. If confirmed, I would fix A and verify with B." Do not memorize that line as filler; replace every variable with facts from the scenario. For code rounds, narrate why the locator or wait expresses user behavior while you write it.
Common Mistakes
- Raising every timeout before identifying which timeout expired.
- Assuming
on-first-retryrecords the initial failed attempt. - Using
.first()or.nth()to hide locator ambiguity without a business reason. - Calling
isVisible()once and expecting it to retry like a web-first assertion. - Registering
waitForResponse()after the click and missing a fast response. - Treating status 200 as proof that the UI received valid business data.
- Replacing actionability checks with
force: truewithout testing user reachability. - Keeping
page.pause()or--debugbehavior in unattended CI. - Calling a retry pass successful without recording the flaky classification.
- Sharing traces without reviewing DOM, request, source, and attachment data.
- Changing workers, browser, data, and timeout simultaneously, which prevents causal comparison.
- Explaining the final assertion while ignoring an earlier failed request or page error.
Conclusion
Junior SDET Playwright trace debugging interview questions become manageable when you follow evidence in order. Start at the failure, find the earliest incorrect state, connect it to locator, actionability, network, console, data, or environment evidence, and make one root-cause change.
Practice the 45 answers aloud, run the three example specs, and explain what each trace proves. When you can distinguish a symptom from its cause and verify a focused repair, you are ready for both the interview and the first real CI failure on the job.
Interview Questions and Answers
What is a Playwright trace?
It is a recorded artifact that connects test actions and assertions with timing, DOM snapshots, screenshots, source, network activity, and browser logs. I use it to reconstruct a failure and find the first incorrect state. It is especially useful for CI runs that I cannot inspect live.
How do you begin analyzing a failed trace?
I open the failed action or assertion and read its call log. Then I move backward to the last correct state and look for the earliest divergence in the DOM, network, console, or locator resolution. That point determines my first testable hypothesis.
Why can a visible element still fail a click?
Playwright also requires the target to be stable, enabled, able to receive events, and uniquely resolved. I inspect the actionability log for an overlay, animation, duplicate match, or replacement. I fix the readiness signal or locator instead of forcing the click.
Why is waitForTimeout a weak synchronization method?
It waits for elapsed time rather than application readiness. The delay wastes time on fast runs and can still fail on slower ones. I replace it with a web-first assertion or a targeted event tied to the required outcome.
How do you safely wait for a response caused by a click?
I create the `page.waitForResponse()` promise before the click and filter it by meaningful URL and method. After the action, I await the response and verify its status or payload. I still assert the final UI state because transport completion does not prove rendering.
What does a passed retry tell you?
It is a flaky result, which proves the outcome changed between attempts. I compare failure and retry evidence for data, timing, environment, or shared-state differences. I do not treat the retry as a fix.
How do you debug a CI-only Playwright failure?
I download the CI trace and confirm its project, shard, commit, retry, and deployment. Then I compare browser settings, environment, workers, data, and resource pressure with local execution. I reproduce one difference at a time so the conclusion remains causal.
When would you use Playwright Inspector instead of Trace Viewer?
I use Inspector when I can reproduce locally and want to step through calls, pick locators, or examine live actionability. I use Trace Viewer for a completed run whose exact recorded state matters. The choice depends on whether I need live control or retained evidence.
How do you fix a strict mode violation?
I inspect all matches and identify the user-facing or domain property that makes the target unique. Then I scope with a role, accessible name, label, stable test id, or meaningful parent. I avoid `.first()` unless order is explicitly part of the requirement.
What makes a strong junior debugging answer?
It separates observed facts from a testable hypothesis. It names the artifact that can confirm the cause, proposes a root-cause fix, and includes focused verification. A short evidence chain is stronger than listing tools without explaining their purpose.
Frequently Asked Questions
What should a junior SDET know about Playwright Trace Viewer?
Know how to record and open a trace, read actions and call logs, inspect DOM snapshots, and correlate network or console evidence with the first incorrect state. Explain why a trace is stronger than a final screenshot for reconstructing a failure.
How do I open a Playwright trace zip file?
Run `npx playwright show-trace path/to/trace.zip`. You can also open the run with `npx playwright show-report` and select the trace attachment from the failed test details.
Does on-first-retry capture the first Playwright failure?
No. It records the first retry, not retry index zero. Use a failure-retention mode when evidence from the original failed attempt is required.
Why is my Playwright trace missing in CI?
The test may not have retried, retries may be disabled, or CI may not upload the output directory after a failed command. Check the result classification, trace mode, retry count, `test-results`, report path, and artifact condition.
What is the best first step for debugging a Playwright timeout?
Read the error and call log to identify whether the test, assertion, action, navigation, hook, or fixture timed out. Then inspect the last started operation and its required readiness condition before increasing any limit.
Should junior SDETs use force true for failed clicks?
Not as a routine fix. A forced click can hide an overlay or usability defect, so first inspect event reception, stability, enabled state, strictness, and element replacement.
What is the difference between UI Mode and Trace Viewer?
UI Mode is an interactive local development and debugging workspace. Trace Viewer reconstructs a recorded run, making it the better choice for examining the exact evidence from a remote CI failure.
How many Playwright debugging questions should I practice for a junior SDET interview?
Practice enough scenarios to cover traces, locators, waits, timeouts, network, browser errors, retries, CI, and live debug tools. The 45 questions in this guide provide that breadth while keeping every answer tied to a concrete investigation.