Skip to content

feat(api): add filter option to Page.pageErrors() and stop clearing page errors on navigate#39615

Closed
yury-s wants to merge 5 commits intomicrosoft:mainfrom
yury-s:feat-page-errors-filter
Closed

feat(api): add filter option to Page.pageErrors() and stop clearing page errors on navigate#39615
yury-s wants to merge 5 commits intomicrosoft:mainfrom
yury-s:feat-page-errors-filter

Conversation

@yury-s
Copy link
Member

@yury-s yury-s commented Mar 11, 2026

No description provided.

yury-s added 5 commits March 10, 2026 18:11
Adds a `filter` option ('all' | 'sinceNavigation') to
`Page.consoleMessages()`. When 'sinceNavigation' is passed, only
messages logged after the last committed main-frame navigation are
returned. The last pre-navigation message is marked with a symbol
in the shared array — no separate array needed.
@yury-s yury-s requested review from dgozman and pavelfeldman and removed request for dgozman March 11, 2026 06:28
@yury-s
Copy link
Member Author

yury-s commented Mar 11, 2026

This PR depends on #39608

@github-actions
Copy link
Contributor

Test results for "MCP"

8 failed
❌ [chrome] › mcp/autowait.spec.ts:19 › racy navigation destroys context @mcp-windows-latest
❌ [chrome] › mcp/cli-session.spec.ts:70 › close-all @mcp-windows-latest
❌ [firefox] › mcp/init-script.spec.ts:22 › --init-script option loads and executes script (isolated) @mcp-ubuntu-latest
❌ [firefox] › mcp/init-script.spec.ts:22 › --init-script option loads and executes script (persistent) @mcp-ubuntu-latest
❌ [firefox] › mcp/init-script.spec.ts:22 › --init-script option loads and executes script (isolated) @mcp-windows-latest
❌ [firefox] › mcp/init-script.spec.ts:22 › --init-script option loads and executes script (persistent) @mcp-windows-latest
❌ [firefox] › mcp/init-script.spec.ts:22 › --init-script option loads and executes script (isolated) @mcp-macos-latest
❌ [firefox] › mcp/init-script.spec.ts:22 › --init-script option loads and executes script (persistent) @mcp-macos-latest

5145 passed, 164 skipped


Merge workflow run.

@github-actions
Copy link
Contributor

Test results for "tests 1"

2 failed
❌ [webkit-library] › library/proxy.spec.ts:127 › should allow bypassing [::1] requests @webkit-ubuntu-22.04-node20
❌ [playwright-test] › ui-mode-test-network-tab.spec.ts:397 › should not preserve selection across test runs @windows-latest-node20

5 flaky ⚠️ [chromium-library] › library/video.spec.ts:356 › screencast › should capture navigation `@chromium-ubuntu-22.04-arm-node20`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1080 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104 › should work with strict CSP policy `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:433 › should work behind reverse proxy `@macos-latest-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:700 › should indicate current test status `@windows-latest-node20`

38960 passed, 847 skipped


Merge workflow run.

- `filter` <[PageErrorsFilter]<"all"|"sinceNavigation">>

Controls which errors are returned:
- `'sinceNavigation'` (default) — returns only errors thrown after the last committed main-frame navigation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Breaking?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

@yury-s
Copy link
Member Author

yury-s commented Mar 11, 2026

Subsumed by #39608

@yury-s yury-s closed this Mar 11, 2026
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.

2 participants