Skip to content

fix(screenshot): support full-page SVG documents - #43972

Merged
Dmitry Gozman (dgozman) merged 1 commit into
mainfrom
triage/43962/42253557980-1
Nov 8, 2026
Merged

Dmitry Gozman (dgozman) merged 1 commit into
mainfrom
triage/43962/42253557980-1

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor

Full-page screenshots waited for document.body, which never exists in standalone SVG documents. Use the document root and include body measurements when available; missing SVG offset measurements contribute zero. HTML size calculation keeps the same measurements.

Extend SS-011 with a standalone SVG and check its full dimensions and bottom-right pixel.

Fixes #43962

Triaged on Linux by the Playwright bot - agent run

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

});
expect(screenshot).toMatchSnapshot('screenshot-grid-fullpage.png');

server.setRoute('/full-page.svg', (request, response) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a separate test because it tests a vastly different scenario

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the standalone SVG scenario into its own issue-tagged test, SS-097, and restored SS-011 to its original HTML-only test. Both pass on all three browsers.

Revision run on Linux - workflow run

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot. I started to address the review comments on Linux: agent run

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor Author

Hi, I'm the Playwright bot. I moved the SVG regression into its own issue-tagged test, SS-097, restored the existing HTML test, and updated the test registry.

The HTML and SVG tests pass on Chromium, Firefox and WebKit. The SVG test times out on all three without the fix. Build and flint pass. Both screenshot test files ran: 262 passed, 3 skipped, and 2 Firefox WebGL tests failed; those same failures occur without the fix.

Revision run on Linux - workflow run

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 flaky ⚠️ [chromium-library] › library/video.spec.ts:690 › screencast › VI-028 should capture full viewport `@chromium-playwright-x64-ubuntu24-64-core-node22`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › VI-030 should work with video+trace `@chromium-playwright-x64-ubuntu24-64-core-node22`

23616 passed, 705 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

5194 passed, 616 skipped


Merge workflow run.

@dgozman
Dmitry Gozman (dgozman) merged commit 84e2bdc into main Nov 8, 2026
31 checks passed
@dgozman
Dmitry Gozman (dgozman) deleted the triage/43962/42253557980-1 branch November 8, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: page.screenshot({ fullPage: true }) times out on SVG documents (no document.body)

2 participants