Skip to content

Conversation

@dgozman
Copy link
Contributor

@dgozman dgozman commented Jan 8, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds console API support to the npx playwright open command by extracting the console API exposure logic into a dedicated internal method and invoking it when the open command is executed.

Key Changes:

  • Created a new internal exposeConsoleApi() method that can be called independently
  • Refactored existing debugMode() === 'console' initialization to use the new method
  • Added protocol channel definitions for the new method
  • Integrated console API exposure into the open CLI command

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/protocol/src/protocol.yml Adds internal exposeConsoleApi method definition to BrowserContext
packages/protocol/src/channels.d.ts Adds TypeScript type definitions for the new method channel
packages/playwright-core/src/utils/isomorphic/protocolMetainfo.ts Registers the new method as internal in metadata
packages/playwright-core/src/server/browserContext.ts Implements exposeConsoleApi() with idempotency guard using _consoleApiExposed flag
packages/playwright-core/src/server/dispatchers/browserContextDispatcher.ts Adds dispatcher handler for the new method
packages/playwright-core/src/protocol/validator.ts Adds validation schemas for the new method parameters and result
packages/playwright-core/src/client/browserContext.ts Adds client-side _exposeConsoleApi() method wrapper
packages/playwright-core/src/cli/program.ts Calls _exposeConsoleApi() in the open command implementation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Test results for "tests 1"

7 failed
❌ [playwright-test] › expect-poll.spec.ts:162 › should support .not predicate @macos-latest-node20
❌ [playwright-test] › expect.spec.ts:57 › should include custom expect message with web-first assertions @macos-latest-node20
❌ [playwright-test] › expect.spec.ts:508 › should support toHaveURL with baseURL from webServer @macos-latest-node20
❌ [playwright-test] › expect.spec.ts:603 › should print expected/received before timeout @macos-latest-node20
❌ [playwright-test] › runner.spec.ts:124 › should ignore subprocess creation error because of SIGINT @macos-latest-node20
❌ [playwright-test] › reporter-html.spec.ts:1037 › created › should have link for opening HTML attachments in new tab @macos-latest-node20
❌ [playwright-test] › to-have-screenshot.spec.ts:1022 › should satisfy both maxDiffPixelRatio and maxDiffPixels @macos-latest-node20

3 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-pick-locator.spec.ts:35 › should update locator highlight `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-page] › page/workers.spec.ts:150 › should clear upon navigation `@webkit-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:426 › should work behind reverse proxy `@macos-latest-node20`

34406 passed, 696 skipped


Merge workflow run.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Test results for "MCP"

2 failed
❌ [chrome] › mcp/video.spec.ts:63 › should work with recordVideo (persistent) @mcp-macos-15
❌ [chromium] › mcp/sse.spec.ts:233 › sse transport shared context @mcp-macos-15

2820 passed, 116 skipped


Merge workflow 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.

2 participants