arrow-left Back to topicQuizTrace viewerCheck yourself1.A test fails on CI with 'element not found'. You have a trace. What's the first thing to check?Check the Console tab for JavaScript errors that might have broken the pageFind the red failure marker on the timeline, click the failing action, check the Before/After DOM snapshots to see what was actually on the pageCheck the Network tab to see if the page loaded correctlyLook at the Log tab to see which locator Playwright tried to match2.Which trace recording mode is recommended for CI and why?trace: 'on' — always record so you have traces for every test whether it passes or failstrace: 'on-first-retry' — records only when a test actually fails (requires a retry), balancing debugging usefulness with storage costtrace: 'off' — traces slow down CI and the HTML report is enough for debuggingtrace: 'retain-on-failure' — records everything and discards only after a test passes, maximizing coverage3.You downloaded a trace.zip from CI but don't have Playwright installed locally. How can you view the trace?Unzip the file and open index.html in any browserOpen trace.playwright.dev in a browser and drag the .zip file onto itUse npx playwright show-trace — npx downloads Playwright temporarilyTraces can only be viewed by whoever recorded them — they're machine-specific4.In the Trace Viewer, what does the 'Action' DOM snapshot show (as opposed to 'Before' and 'After')?The page state when the test startedThe exact moment of the click or fill — shows precisely where Playwright's action landed, highlighted in the snapshotThe DOM tree parsed from the locator selector used in that actionThe accessibility tree at the time of the action5.What information does the 'Log' tab in Trace Viewer show?The raw browser console output during the testWhat Playwright was waiting for — which actionability checks ran, which locator it tried to match, and the sequence of retriesThe test source code with each line highlighted as it executedNetwork request/response pairs associated with the selected action6.A teammate shares a trace.zip from a CI failure. You know it contains auth tokens from the test user. What should you be careful about?Nothing — test environment credentials are disposable and not sensitiveDon't post the trace to public Slack channels or GitHub issues — auth tokens visible in the trace could be used to access the test environmentPlaywright automatically redacts auth tokens from traces before savingOnly traces from production runs contain real credentials — CI test credentials are auto-rotated7.What does the colored timeline at the top of Trace Viewer represent?CPU and memory usage during the test runA chronological view of actions and navigations — blue blocks for Playwright actions, green for navigations, with a red marker at the point of failureNetwork waterfall — each bar represents a network requestTest steps as defined in test.step() blocks8.You click an action in the Actions panel and the DOM snapshot shows the page but the layout looks wrong. What can you do to inspect the CSS more closely?Use the Trace Viewer's built-in CSS inspector on the right side panelPop out the DOM snapshot into a separate browser window — you can then open DevTools and inspect the HTML and CSSExport the snapshot as HTML and open it in the browserThe DOM snapshot is read-only — you can't inspect CSS in Trace ViewerSubmit answersarrow-left PreviousUI ModeTypeScriptNext arrow-right