How to Record and Replay Browser Automation Sessions for Debugging
TL;DR
Enable Session Recording before you launch the managed browser you intend to replay.
Reproduce one bounded staging task and capture the job ID, intended page, and expected result.
Stop the browser, wait for archiving, and select the recorded document in Session History.
DOM replay reconstructs recorded page changes. A screenshot captures pixels, and a Playwright trace follows test actions.
Input masking can leave page text and diagnostics visible. Inspect an artifact before sharing it.
Confirm a replay-based diagnosis by rerunning the original test with a precise assertion.
What does browser automation session replay show?
Browser automation session replay shows how a recorded page changed over time so an engineer can inspect the last known good state before a failure. A worker log might say a button timed out. The recording may show that the browser was still on a sign-in screen, that a loading overlay covered the button, or that confirmation appeared on another tab. Each observation leads to a different fix. Nstdata Cloud Browser records supported managed sessions for that investigation.
Use a synthetic staging workflow for the first run. A tester opens a report, applies a saved filter, and waits for a visible results heading. The failure to investigate is a spinner that stays visible after an app receives an intentional error response from a staging fixture. A replay can help establish that the results heading never appeared. To establish whether the request failed at the server or whether the app discarded a response, corroborate the recording with network and application evidence. The browser debugging guide covers live signals that complement archived replay.
Which recording method fits the investigation?
Choose an artifact based on whether you need recorded page state, Playwright action history, or a visual capture. A suspected locator regression calls for action-level evidence. A question about what an operator saw while signing in calls for the original hosted session.
Inspect a completed remote run by document and playback position
Coverage depends on recording and archive availability
Playwright trace
Locate a failed action or assertion in a test run
Captures only the traced scope and period
Screenshot
Document one checkpoint or visual defect
Earlier actions and requests require separate evidence
Live DevTools
Investigate an issue while it is happening
Inspect the selected document while the browser runs
The Playwright Trace Viewer guide describes linking actions with snapshots. Chrome DevTools can also record and rerun flows with its separate Recorder feature. Know whether your artifact represents recorded state or starts another run before relying on it. Chrome Recorder documentation.
What should you prepare before recording?
Prepare an authorized workspace, one staging URL, synthetic test data, and a written pass condition. Record the deployment ID, job ID, and expected receipt or application landmark. Choose a session owner who can stop the browser independently of the worker. Keep signed access URLs out of tickets.
Start from the same fixture state each time. For the report example, write down the initial route, the filter label, the expected data, and the heading that should appear. Add the account role if the feature depends on permissions. A teammate should be able to repeat the test using those notes if the archive is missing. The session lifecycle guide explains why the worker and session have separate shutdown states.
How do you record and replay a managed browser session?
Start the session with recording enabled, reproduce one failure, and review the archived document. Follow the current Browser Automation documentation.
Step 1. Configure a named session
Open Cloud Browser → Playground and select the intended workspace. Enter a Session Name tied to your job. Choose available values for Proxy Country, Resource Class, and Session Duration. Leave enough time for the reproduction and cleanup, and use a session name that can be searched without exposing an account or customer name.
Step 2. Enable recording
Turn on Session Recording before launch. Keep Hide Input Content enabled when applicable. Password fields remain masked by the recorder. Other text and saved diagnostics still need review, so run the scenario against synthetic data.
[Screenshot: Playground recording controls for a staging session, with workspace identifiers and credentials hidden.]
Step 3. Reproduce one failure
Click Launch Browser and wait until the preview shows Running. Open the staging report and apply the filter once. Note the time the action started and whether the expected results heading appeared. If an engineer is watching live, record a sanitized error type or response status from the selected page.
Step 4. End the session
Click Stop Browser after the reproduction. Wait for termination. Record shutdown and task outcome independently, then allow the recording to archive.
Step 5. Select the relevant archived document
Open Cloud Browser → Session History and click the session name. Inspect Page Observations and Session Replay when data is available. If several documents were captured, select Replay Page. Start playback, scrub to the failure, and write down the playback offset and a safe page label. The timestamp belongs to the selected document. Cross-tab ordering requires corroboration from your job events.
Step 6. Verify the diagnosis with a new run
Turn the observation into a test. For example, reproduce a staging HTTP 503 and check that a clear error state replaces the spinner. Then run the successful case and assert that the expected report heading appears. If the change fixes both paths, attach the job IDs and assertion results to the incident record.
How does Nstdata Cloud Browser support replay-based debugging?
Nstdata Cloud Browser provides managed cloud browsers for browser automation and AI agents, with optional recording and archived replay that fit this investigation. Operators can reproduce a bug through Live View while a worker can reproduce it over CDP. Both approaches can use the intended browser environment and configured egress. The replay documents what the managed browser captured. Application logs and assertions can establish what the backend did.
Session-level capture. Turn recording on before launch and associate a searchable session name with the job.
Document-specific replay. Compare saved page changes around a known checkpoint. Keep a separate timeline for workflows that span tabs.
Available diagnostics. Use saved Console or Network observations to form a hypothesis. Verify application state independently.
Built-in proxy routing. Select an available location without wiring up another proxy client. Test the apparent exit separately when location is part of the defect.
Why is a recording missing, partial, or visually different?
A missing replay usually points to recording configuration, archive state, retention, or a document outside the captured window. An archive described as ready can be readable even if the desired page has limited observations. A partial archive is explicitly incomplete. Check whether the initial snapshot and failure interval exist for your chosen document.
Symptom
Inspect first
Practical next step
No replay listed
Recording enabled before launch and correct session selected
Check archive availability or run a fresh staging reproduction
Last action unavailable
Capture duration and selected document
Compare job timestamps and choose the correct document
Image or canvas differs
DOM reconstruction and missing external resources
Verify appearance with a screenshot from a controlled run
DevTools data seems incomplete
Selected page and playback position
Consult available observations and application logs
Browser still active
Current runtime state
Stop the original session and confirm termination
Replay reconstructs recorded changes. The service does not need to execute the original page scripts during reconstruction, so images, fonts, and canvas can differ. If a bug hinges on visual appearance, take a screenshot at the intended checkpoint on the next run. A Playwright trace may help identify which assertion ran before the page changed.
Keep support tickets narrow. Include a safe route or label, time, signal, and a reproduction instruction. Avoid sending complete recordings with private page data. The OWASP logging guidance explains why access tokens and sensitive identifiers deserve special handling. For operator-driven steps, record when control changed hands. See the human handoff guide.
What should a replay investigation leave behind?
A replay investigation should leave a reproducible failure, one corroborated explanation, and a verified rerun. Keep the job ID, session ID, safe page label, playback offset, expected outcome, and observed outcome. Add one supporting fact such as the sanitized status of the report request. Store the final session shutdown as its own result so operators can close out active usage separately.