Skip to content

Cannot connect to existing browser CDP session on localhost:9222 #270

@guocity

Description

@guocity

When attempting to connect to an existing browser via a CDP session (e.g., localhost:9222), the CLI opens a new browser instance instead of attaching to the existing one.

Steps to reproduce:
1. Start a browser with remote debugging enabled on port 9222.
2. Run playwright-cli attempting to connect to that CDP endpoint.

Actual result: A new browser window opens.
Expected result: It should connect to the existing session at localhost:9222.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions