Skip to content

feat(content): add includeShadow option to page.content() - #42845

Merged
Yury Semikhatsky (yury-s) merged 3 commits into
microsoft:mainfrom
yury-s:fix-42794
Sep 22, 2026
Merged

Yury Semikhatsky (yury-s) merged 3 commits into
microsoft:mainfrom
yury-s:fix-42794

Conversation

@yury-s

@yury-s Yury Semikhatsky (yury-s) commented Sep 21, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #42794

Comment thread packages/playwright-core/src/server/frames.ts Outdated
@yury-s Yury Semikhatsky (yury-s) changed the title feat(content): add includeShadowRoots option to page.content() feat(content): add includeShadow option to page.content() Sep 21, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

7 flaky ⚠️ [chromium-library] › library/video.spec.ts:725 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:301 › should report intercepted service worker requests in HAR `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:690 › screencast › should capture full viewport `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-node22`
⚠️ [chromium-library] › library/video.spec.ts:690 › screencast › should capture full viewport `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`

50478 passed, 1242 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/cli-session.spec.ts:54 › idle timeout shuts the session down @mcp-windows-latest-firefox

8691 passed, 1474 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I triaged the failing CI run here.

🟢 The one failure is a known pre-existing flake — this PR is clear

[firefox] › mcp/cli-session.spec.ts:54 › idle timeout shuts the session down fails only on the mcp-windows-latest-firefox bot, and it does so on main pushes too — 48 of 148 runs red (32%), on SHAs this PR can't be responsible for.

Details

Pre-existing flake / infra

Overall

The diff adds an includeShadow option to page.content() / frame.content() — docs, the protocol/validator plumbing, injectedScript.ts serialization, and one test in tests/page/page-set-content.spec.ts. Nothing there touches MCP CLI session lifecycle or idle-timeout handling, and the rest of CI is green (tests 1: 50478 passed, 0 failed; 8691 MCP tests passed).

Triaged by the Playwright bot - agent run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Page.content() omits shadow DOM, but locators pierce it — selectors that look unique silently aren't (revives #30816)

2 participants