---
title: "Send the page's DOM, not only a screenshot | Proofline"
description: "A screenshot shows pixels. When the bug is that the page holds the wrong element, attribute or text, the maintainer needs the DOM."
url: https://proofline.sh/learn/dom-snapshot-evidence/
---

[Learning center](/learn/)

# Send the page's DOM, not only a screenshot

A screenshot shows pixels. When the bug is that the page holds the wrong element, attribute or text, the maintainer needs the DOM. The common ways to save it each leave something out, and in our fixture two of them dropped the very values a form bug turns on.

Schema conflicts The Proofline team November 22, 2026 3 min read

## Three ways to save a page, tested

We built a fixture page in Chromium 1243 (Playwright 1.63) with an input whose `value` attribute was `initial`, typed `typed text` into it, ticked a checkbox, chose a second option in a select, and attached an open shadow root containing a bold word. Then we saved the page three ways.

| Method | Typed input text | Checkbox ticked, option selected | Open shadow root content |
| --- | --- | --- | --- |
| `document.documentElement.outerHTML`, or **Copy outerHTML** in the Elements panel | Missing: shows `value="initial"` | Missing | Missing |
| MHTML snapshot from the Chrome DevTools Protocol's `Page.captureSnapshot`, the same single-file format as Chrome's **Save page as…** | Missing | Missing | Missing |
| Playwright trace DOM snapshot | Present | Present | Present |

The reason is the difference between attributes and properties. Typing changes an input's `value` property; the `value` attribute stays as the HTML set it, and serialization writes attributes. A shadow root is not part of the element's children, so `outerHTML` does not include it. [MDN: `Element.outerHTML`](https://developer.mozilla.org/en-US/docs/Web/API/Element/outerHTML) · [Chrome DevTools Protocol: Page.captureSnapshot](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-captureSnapshot)

## Save the part of the DOM that matters

For most reports, the maintainer needs one element and its state, not the whole page.

1.  In the Elements panel, select the element and use **Copy > Copy outerHTML** for its markup.
    
2.  In the Console, `$0` is the selected element. Read the properties that serialization drops:
    
    ```
    ({ value: $0.value, checked: $0.checked, disabled: $0.disabled,
       ariaExpanded: $0.getAttribute('aria-expanded'),
       shadow: $0.shadowRoot?.innerHTML })
    ```
    
3.  For an element inside a shadow root, `getHTML` with `serializableShadowRoots` or an explicit `shadowRoots` list includes it. In our fixture, `document.body.getHTML({ shadowRoots: [host.shadowRoot] })` returned the shadow root's content. [MDN: `Element.getHTML()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getHTML)
    
4.  Add the computed style that decides a visual bug, such as `getComputedStyle($0).display`, rather than the whole stylesheet.
    

## When a whole-page save is right

Save the whole page when the bug is in structure across the page, such as duplicated IDs, a missing landmark or an element outside the container it should be in. An MHTML file keeps the styles and images, so the maintainer can open it and look. Note in the report that form values and shadow DOM are not in it.

When you need the page state at each step, a [Playwright trace](/learn/playwright-trace-bug-report/) records DOM snapshots with input values and is the better format.

## Worked example: a coupon field that looked filled

This example is fictional. A tester reports that applying a coupon says "Enter a code" although the field shows `WINTER10`. They attach the field's markup from **Copy outerHTML**: `<input name="coupon" value="">`.

The empty `value` attribute does not mean the field was empty, because typing never changes the attribute. The developer asks for the property instead. In the console, `$0.value` returns `"WINTER10 "`, with a trailing space from a pasted code, and the server's validation rejected it as malformed before the "Enter a code" fallback message. The outerHTML could not have shown it; the property did. [Pasted text that fails](/learn/pasted-text-bug/) covers the clipboard side.

## Questions

### Does a Playwright trace record every form state?

In our fixture it recorded typed text, the checkbox and the selected option, stored as extra attributes on each element in the snapshot. It records the page Playwright drove, so it does not help with a bug in someone's everyday browser profile.

### Can I send the DOM of a page behind a login?

The DOM contains the page's text, which may include personal data. Copy the element you need, or reproduce with a test account.

### Is a DOM save enough to reproduce the bug?

Rarely. It shows the result, not the steps or the data that produced it. Pair it with the steps and the state, as [the replay guide](/learn/replay-browser-bug-report/) describes.

Return to [reproducing what someone else saw](/learn/replay-browser-bug-report/) for the other layers a replay needs.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Send a Playwright trace when a video cannot answer the question](/learn/playwright-trace-bug-report/)
    
    Network outages The Proofline team November 22, 2026 4 min read
    
-   ### [Typed text works but pasted text fails: capture the clipboard payload](/learn/pasted-text-bug/)
    
    Schema conflicts The Proofline team November 22, 2026 3 min read
