Skip to content

[Feature]: Support connectOverCDP in defineConfig in @playwright/test #31624

Open
@winston0410

Description

@winston0410

🚀 Feature Request

From the type of defineConfig and more specifically ConnectOptions, there is no option for connection over CDP, which is already supported by Playwright since 1.9.

Example

it would be great if the config allow something like this:

export default defineConfig({
  // omitted

  projects: [
    {
      name: 'chromium',
      use: { ...devices['Desktop Chrome'],
        connectOptions: {
          connectOverCDP: "http://localhost:9222",
        }
      },
    },
  ]
})

Motivation

By support connectOverCDP in the config of @playwright/test, we will be able to connect to a remote headless browser through CDP for testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions